           downloadWaiting = true;
           digitalWrite(readyLED, HIGH);
         }
-      } else {
+      }
+#ifdef DEBUG
+      else {
         debug2("Failure, content length was ", content_length);
-        if (content_length != length)
-          debug2("but length was ", length);
-        if (content_length != cache.size())
-          debug2("but cache size was ", cache.size());
-        systemError(); // you should probably reboot
+        if (content_length != length) debug2("but length was ", length);
+        if (content_length != cache.size()) debug2("but cache size was ", cache.size());
+        systemError();
       }
+#endif
     } else {
-      debug("Response code wasn't 200");
+      debug("Response code != 200");
       recoverableError();
     }
   } else {

  cache.close();

#ifdef DEBUG
    unsigned long duration = millis() - start;
    debug2("Total bytes: ", length);
    debug2("Duration: ", duration);
#endif
}


char* cacheFilename = "TMP";
unsigned long content_length = 0;
boolean statusOk = false;

void checkForDownload() {
  unsigned long length = 0;
  content_length = 0;
  statusOk = false;

#ifdef DEBUG
    unsigned long start;
#endif

  if (SD.exists(cacheFilename)) {
    if (SD.remove(cacheFilename)) {
      debug("Cleared cache");
