Changed file type identification check to a magic number