pub fn open_file_validated(path: &Path) -> Result<File>
Open a file for reading only after validating the path.