       sim900.sendTextMsg(textMessage, PHONE_NUMBER);
       if (sim900.isTextMsgDelivered() == false)
       {
-        // Log SMS failure
-        digitalWrite(MOSFET_SD_PIN, HIGH);
-        delay(1000);
-
         sd.begin();
         sd.writeFile(ERROR_FILENAME, String(unixTime) + ": " + ERROR_SMS);
         sd.writeFile(UNSENT_FILENAME, textMessage);
-
-        digitalWrite(MOSFET_SD_PIN, LOW);
-        delay(1000);
       }
     }
     else
     {
-      // Log GSM failure
-      digitalWrite(MOSFET_SD_PIN, HIGH);
-      delay(1000);
-
       sd.begin();
       sd.writeFile(ERROR_FILENAME, String(unixTime) + ": " + ERROR_GSM);
       sd.writeFile(UNSENT_FILENAME, textMessage);
-
-      digitalWrite(MOSFET_SD_PIN, LOW);
-      delay(1000);
     }
 
     // Reset number of cached readings

  }


  // 2. Turn on thermistor.
  // ----------------------
  digitalWrite(MOSFET_THERM_PIN, HIGH);

  // 3. Take 5 thermistor readings. (one every 20ms)
  // -----------------------------------------------



// Digital Pins
#define MOSFET_US_PIN    5
#define MOSFET_GSM_PIN   6
#define THERM_PIN        7
#define RTC_CS_PIN       8
#define GSM_PWRKEY       9
#define SD_CS_PIN        10
