Added better download error handling