 char* cacheFilename = "TMP";
 unsigned long content_length = 0;
 boolean statusOk = false;
+#ifdef DEBUG
+    unsigned long start;
+#endif
 
 void checkForDownload() {
   unsigned long length = 0;

    client.println();
    boolean parsingHeader = true;
#ifdef DEBUG
    unsigned long start = millis();
#endif
    while(client.connected()) {
      debug("Still connected");
      while(client.available()) {
        if (parsingHeader) {
          client.find("HTTP/1.1 ");
          char statusCode[4];
          client.readBytes(statusCode, 3);
          statusOk = (strcmp(statusCode, "200") == 0);
          client.find("Content-Length: ");

      printFromDownload();
    }
  } else {
    checkForDownload();
    if (!downloadWaiting) {
      delay(pollingDelay);
    }
  }
}
