Move filetype functions out to use in verifier