check if image file exists before md5sum check