     Serial.println("T_out.txt: ");
     readFileToSerial("T_out.txt");
   }
-  trigger_button = false;
-
+  else {
+    SDCardExists = false;
+  }
 }
 
 boolean trigger_lcd = false;
 
-// void updateLCD()
-// {
-//   sprintf(lcd_line_buffer, "%2d/%02d %02d:%02d:%02d", 
-//     month(), day(), hour(), minute(), second());
-//   // lcd.clear();
-//   lcd.setCursor(0,0);
-//   lcd.print(lcd_line_buffer);
-
-//   sprintf(lcd_line_buffer, "IN: %2d, OUT: %3d", 
-//     tempA, tempB);
-//   lcd.setCursor(0,1);
-//   lcd.print(lcd_line_buffer);
-
-//   // LCD refreshed, clear update bit
-//   trigger_lcd = false;
-// }
+void updateLCD()
+{
+  // Don't use sprintf or memory issues break SD card usage :(
+  // sprintf(lcd_line_buffer, "%2d/%02d %02d:%02d:%02d", 
+  //   month(), day(), hour(), minute(), second());
+  // lcd.clear();
+  lcd.setCursor(0,0);
+  lcdPrintLeadingZerosInt( month() );
+  lcd.print("/");
+  lcdPrintLeadingZerosInt( day() );
+  lcd.print(" ");
+
+  lcdPrintLeadingZerosInt( hour() );
+  lcd.print(":");
+  lcdPrintLeadingZerosInt( minute() );
+  lcd.print(":");
+  lcdPrintLeadingZerosInt( second() );
+
+  // sprintf(lcd_line_buffer, "I: %2d, O: %3d", 
+  //   tempA, tempB);
+  lcd.setCursor(0,1);
+  lcd.print("I/O ");
+  lcd.print(tempA,1);
+  // lcd.print((char)223);
+  lcd.print(" ");
+  lcd.print(tempB,1);
+  lcd.print((char)223);
+  lcd.print("C    ");
+}
 
 
 void triggerLCD()


void updateTemperatures()
{
  tempA = thermistorA.getReading();
  tempB = thermistorB.getReading();
}

// Read and record data to log files
void recordData()
{
  delay(250);
  Serial.println("Woo");
  if (startSD())
  {
    // Read thermistors
    updateTemperatures();


  // Set call to update files every minute
  Alarm.timerRepeat(60, buttonInterrupt);

  // Update LCD screenevery second
  Alarm.timerRepeat(1, triggerLCD);

  // Done
  lcd.setCursor(0,1);
  lcd.print("Initialized.");
  Alarm.delay(500);
  lcd.clear();
}

