Add error checking in case of image retrieval issues.