updated the file to enable it to skip corrupted images