jpeg image corruption check