Updated filetype recognition