Patch from Mattias: added verification of lolcat images and retry logic