Use of SPIFFS

I am trying to understand the use of SPIFFS and have created a simple Blynk program where i have a Numeric Input Widget (V10), a Button Widget (V11) and a Labeled Value Display (V12). the function is as follows
1/ Press the Numeric Input Widget to a number from 0-10.
2/ Press Button widget to save the input to SPIFFS.
3/ Labeled Value Display to show saved SPIFF.
The purpose of this exercise is to learn how to save numbered integers (percent values from 0 - 100) to use elsewhere. The issue I am having is the numbers set don’t match with the numbers saved in the SPIFFS. All examples on the web seem to show text files being saved. Any ideas what i am doing wrong?

Code

BLYNK_WRITE(V11)
{
  int SaveButt = param.asInt();   //Save button
  if ( SaveButt == 1)             //Button HIGH
  {
    SPIFFS.begin();
    Data = SPIFFS.open("/d1.text", "w");    //Create file and write
    Data.print(Value);                      //Value from Numeric Input Widget
    Data.close();                     
    Data = SPIFFS.open("/d1.text", "r");    //Open file and read
    Blynk.virtualWrite(V12, Data.read());   //Print saved file content to Labeled Value Display
    Serial.print("Butt HIGH Data: ");
    Serial.println(Data.read());
    Data.close();
  }
  if (SaveButt == 0)    //Button LOW
  {
   SPIFFS.remove("/d1.text");       //Delete saved file
   Blynk.virtualWrite(V12, "0");    //And set Labeled Value Display to 0
   Serial.print("Butt LOW Data: ");
   Serial.println(Data.read());
  }
}

BLYNK_WRITE(V10)
{
  Value = param.asInt();    //Numeric Input Widget 0-10
  Serial.print("Value: ");
  Serial.println(Value);
}

Serial Print Out

Butt LOW Data: -1
Value: 10
Value: 10
Value: 9
Value: 8
Value: 7
Value: 6
Value: 5
Value: 4
Value: 3
Value: 2
Value: 1
Value: 0
Butt HIGH Data: -1
Butt LOW Data: -1
Value: 1
Value: 2
Value: 3
Value: 4
Value: 5
Value: 6
Value: 7
Value: 8
Value: 9
Value: 10
Butt HIGH Data: 48

I think you’ll find that doing a data.read will move the pointer on to the next character in the SPIFFS file.
Best to read all of the characters in the file into a string then print it.

Pete.

Ok I will look into that. Can you explain though why at value 10 I get data 48?

48 is ASCII character 0 (zero).

Pete.

Ah…Ok

So it is working! Just the numbers read from the SPIFFS are in ASCII format. Just need to find a way now to convert