Fixed a bug in the put function :
When the file did not exist on the client side, the filename was still sent to the server, causing the file to be created empty and crashing the server.