Bug fixes in transfer and server code for recv_file stuff