pub fn open_file<P: AsRef<Path>>(path: P) -> Result<File>
Open a file.
Function that provides basic file opening and error handling.