added validate_file