     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;
   }
 


  // Create PINS
  int iaPinConnects[TOTAL_NUM_OF_PINS];
  char caPinNumBuffer[10];
  for(int i=0; i<TOTAL_NUM_OF_PINS ;i++)
  {
    aJson.addItemToObject(apoPin[i],"label", aJson.createItem( g_aPins[i].label ) );

aJsonStream serial_stream(&Serial);

// Web sockets
#define WEB_SOCKET_BUFFER_SIZE 30000

// HW declaration
#define TOTAL_NUM_Dx 14 
