 #endif    
     sample_count = 0;
     sum = 0;
-    append_to_disk(voltage);
+    write_Text_To_Disk(filename,", "+String(voltage));
 
 #if DEBUG_TO_SD
-  write_Text_To_Disk("data.txt","Woke up, logging");
+  write_Text_To_Disk(filename,"Woke up, logging");
 #endif
 
 #if DEBUG

  Wire.begin();

  #if DEBUG_TO_SD
    write_Text_To_Disk("data.txt","setting up system");
  #endif

}

        delay(10);
    }
    // calculate the voltage
    //https://startingelectronics.org/articles/arduino/measuring-voltage-with-arduino/
    // use 5.0 for a 5.0V ADC reference voltage
    // 5.015V is the calibrated reference voltage
    voltage = ((float)sum / (float)NUM_SAMPLES * 5.05) / 1024.0;
