Properly handling close message
-Fixed misplaced id
-Fixed 3 after directory name
-Fixed request of main thread functions on status
-Fixed double logging of sent messages