   initDiagnosticLEDs();
 }
 
+// -- Flag to indicate whether we've encountered an irrecoverable error
+
+boolean systemError = false;
 
 // -- Check for new data and download if found
 

        debug2("Failure, content length: ", content_length);
        if (content_length != length) debug2("length: ", length);
        if (content_length != cache.size()) debug2("cache: ", cache.size());
        systemError();
      }
#endif
    } else {

    if (SD.remove(cacheFilename)) {
      debug("Cleared cache");
    } else {
      debug("Failed to clear cache. Aborting.");
      abortDueToCacheFailure();
      return;
    }
  }
  File cache = SD.open(cacheFilename, FILE_WRITE);
