delete redundant filetype check