add filetype detection