         inputStream.delegate = self
         outputStream.delegate = self
         
-        inputStream.schedule(in: RunLoop.main, forMode: .init("kCFRunLoopDefaultMode"))
+        inputStream.schedule(in: .main, forMode: .common)
         //outputStream.schedule(in: RunLoop.main, forMode: .init("kCFRunLoopDefaultMode"))
         
         inputStream.open()

        }
        
        outputStream?.close()
        outputStream?.remove(from: RunLoop.main, forMode: .init("kCFRunLoopDefaultMode"))
        outputStream = nil
    }
    

        outputStream?.delegate = nil
        
        inputStream?.close()
        inputStream?.remove(from: .main, forMode: .common)
        inputStream = nil
        
        // TOFIX: This sleep is a workaround for truncated file uploading
