file transfer improvements and bug fixes