new version which checks images in a single folder