Detecting the datatype (file format)