   DateTime rtc_time=rtc.now();
   file_name = String( rtc_time.month() ) + '-' + String( rtc_time.day() ) + '-' + 
       String( rtc_time.hour() ) + ".txt";
-
-  if ( !SD.begin(CHIP_SELECT_PIN) ) { 
-#ifdef DEGUB
-    Serial.println("SD card initialization failed!");
-#endif
-  }
+#ifndef DEBUG
+  SD.begin(CHIP_SELECT_PIN);
   delay(100); // otherwise open() will fail
 
   // write header
  
-#ifdef DEBUG
-    Serial.println("Writing header to SD");
-    Serial.flush();
-#endif
-
-  myFile = SD.open(file_name.c_str(), FILE_WRITE);
-  if (myFile) {
-    myFile.print("Rec. #\tDD/MM/YYYY\tHH:MM:SS\tlatitude\tlongitude\t");
-    myFile.println("Sharp value\tGrove value\tCO read\tCO heat\tHumidity\tTemp (celsius)");
-    myFile.close();
-  } else {
-#ifdef DEBUG
-    Serial.println("Error opening SD file to write header");
-#endif
-  }
+  data_file = SD.open(file_name.c_str(), FILE_WRITE);
+  if (data_file) {
+    data_file.print("Rec. #\tMM/DD/YYYY\tHH:MM:SS (UTC)\tlatitude\tlongitude\t");
+    data_file.println("Sharp\tGrove\tCO read\tCO heat\tHumidity\tTemp (celsius)");
+    data_file.close();
+  }
+
+ #endif
 
   // **************** FOR SENOR READING TIMER ****************
   sensors_read_time_start = millis();

float sharp_voltage=0;

#define SHARP_LED_PIN 4      // Digital PIN 4 ATMEGA 6
#define SHARP_DELAY_TIME 280 

// **************** FOR MQ7 SENSOR ****************
#define CO_PWR_SEL_PIN 2    // Digital PIN 2 ATMEGA PIN 4

#endif

  if( (millis() - sensors_read_time_start) > SENSORS_READ_TIME ) {
    RecordSensors();
    sensors_read_time_start = millis();
  }
    
} // void loop()


void RecordSensors()
{

#ifdef DEBUG
