 
   // 4. Turn off thermistor.
   // -----------------------
-  digitalWrite(MOSFET_THERM_PIN, LOW);
+  digitalWrite(THERM_PIN, LOW);
   delay(500);
 
   // 5. Average 5 thermistor readings.

      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

  // 15. Save data string to text file on SD card: "1399506809 1000 100" (roughly 20 characters)
  // -------------------------------------------------------------------------------------------

  // Try to turn on SD card. Should only need to be called once.
  sd.begin();
  sd.writeFile(BACKUP_FILENAME, dataString);
  delay(1000);


  // 16. Are there 4 unsent data strings?
