pub fn write_str_to_path(filename: &Path, s: &str) -> Result<()>