Was not closing the file on the server side
Added some log messages, and errors to send back to the client

- Errors are not tested
- Logging can be disabled/enabled using rtransfer.SetLogging