thrift filetype detect