renamed check_file to validate_file