Handle error cases in image downloads