Fix non existent file upload

Stop immediatly instead of trying to upload zero-length file to server