Improvements to file transfer error handling