added jpg check for corruption

on JPEG file fetch, check the integrity of the file and perform 1 retry if the file is corrupted.
This happens frequently on S3, so a retry fixes 99% of that problem