Check jpeg file header