Added check for JPEG file and more comments. Also found the file sizes.