solve filetype problem