Improved error handling in transfers