Fix file type detect