add download error handling