Improving download error handling