     sprintf(buf, LOCAL_RESOURCE_PATH"%s", whitelist[n].urlpath);
 
     if (libwebsockets_serve_http_file(context, wsi, buf, whitelist[n].mimetype))
-      return 1; /* through completion or error, close the socket */
-
-    /*
-     * notice that the sending of the file completes asynchronously,
-     * we'll get a LWS_CALLBACK_HTTP_FILE_COMPLETION callback when
-     * it's done
-     */
+      return 1; // through completion or error, close the socket 
+
+     ///////////
+     // notice that the sending of the file completes asynchronously,
+     // we'll get a LWS_CALLBACK_HTTP_FILE_COMPLETION callback when
+     // it's done
+     ///////////     
 
     break;
 
   case LWS_CALLBACK_HTTP_FILE_COMPLETION:
 
     lwsl_notice("LWS_FILE_COMPLETION");
+    
+
+      // debug_serial_print("LWS_FILE_COMPLETION: "); // debug
+  //    debug_serial_println(String(reason)); // debug
+
+    
     return 1;
 
 
   default:
+
+
+      // debug_serial_print("LWS_HTTP_CALLBACK_REASON: "); // debug
+ //     debug_serial_println(String(reason)); // debug
+
+ 
     break;
   }
 


    ///////////////////////////////////////
    // Connect/Disconnect
    /*
    switch(g_iDebugState)
    {
      case 0:
        snprintf(g_acMessage,sizeof(g_acMessage),g_acPin13_On_3_Analog);  
        processMessage(g_acMessage);
        g_iDebugState = 1;
      break;
      
      case 1:
        snprintf(g_acMessage,sizeof(g_acMessage),g_acConnA0_TO_3);  
        processMessage(g_acMessage);   
        g_iDebugState = 2;       
      break;
      
      default:
      
      break;
    }
   
    updateBoardState();
    */
    ///////////////////////////////////////

    //////////////////////////////////////////
    // Test sending message
    /*
    aJsonObject *msg = getJsonBoardState();
    aJson.print(msg, &serial_stream);
    Serial.println("");
    aJson.deleteItem(msg);
    */
    //////////////////////////////////////////  

    last_print = millis();


   g_iMsgCount++; // debug
    
//  char buf[LOCAL_BUFFER_SIZE];
//  memset(buf,'\0',LOCAL_BUFFER_SIZE);
  
  aJsonObject* poJsonBoardState = aJson.createObject();

