Refresh time...Can anyone help me please??

And this is another code I tried:

/Desarrollado a partir de Datalogger de la libreria SD y del script de 18B20/

#include <SD.h>
#include <OneWire.h>
#include <DallasTemperature.h>

//Define puerto 18B20s
#define ONE_WIRE_BUS 11
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

//SPI SD Card Pins
//MOSI = Pin 11
//MISO = Pin 12
//SCLK = PIN 13
int CS_pin = 53;
int pow_pin = 8;

float refresh_rate = 0.0; //Dataloger Refresh Rate

void setup(void)
{
sensors.begin();//Inicializa sensores 18B20
Serial.begin(9600);

//--------------------------------------------------------------TARJETA---------------------------------------------------
Serial.println("Inicializando tarjeta");
//CS Pin is an output
pinMode(CS_pin, OUTPUT);

//SD Card will Draw Power from Pin 8, so set it high
pinMode(pow_pin, OUTPUT);
digitalWrite(pow_pin, HIGH);

//inicializa tarjeta SD
if (!SD.begin(CS_pin))
{
Serial.println("Fallo de tarjeta SD");
return;
}
Serial.println("Tarjeta lista");

//Lee informacion de configuracion
File commandFile = SD.open("COMMANDS.txt");
if (commandFile)
{
Serial.println("Leyendo configuracion");

float decade = pow(10, (commandFile.available() - 1));
while(commandFile.available())
{
float temp = (commandFile.read() - '0');
refresh_rate = temp*decade+refresh_rate;
decade = decade/10;
}
Serial.print("Tiempo refresco = ");
Serial.print(refresh_rate);
Serial.println("ms");
commandFile.close();
}
else
{
Serial.println("No se puede leer configuracion");
return;
}
//Write Log File Header
File logFile = SD.open("LOG.csv", FILE_WRITE);
if (logFile)
{
logFile.println(", , , ,"); //Just a leading blank line, incase there was previous data
String header = "ID, Light, Temp, IR1, IR2";
logFile.println(header);
logFile.close();
Serial.println(header);
}
else
{
Serial.println("No se puede abrir LOG");
}

}

//--------------------------------------------------------------FIN TARJETA-------------------------------------------------
void loop()
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus

sensors.requestTemperatures(); // Send the command to get temperatures

{

//Open a file to write to
//Only one file can be open at a time
File logFile = SD.open("LOG.csv", FILE_WRITE);
if (logFile)
{
logFile.println(sensors.getTempCByIndex(0));
logFile.close();
Serial.println(sensors.getTempCByIndex(0));
}
else
{
Serial.println("No se puede abrir LOG");
}

}

delay(refresh_rate);
}

I accept all recomendations of my problem or something else. Thanks!