better message when file's encoding doesn't match the declared one