pub fn save_patch_to_file(matrix: &mut Matrix, filepath: &str) -> Result<()>