pub fn write_string(path: &Path, content: &str) -> Result<()>
Write string content to a file atomically using a temporary file + rename strategy with file locking