Adding file type checking to structured files