use fnmatch instead of check_pattern