add error flag when downloading images.