Handle error when make thumbnails