moved filetype checking to the Meta lib