check_file_type