api patch Renamed writeFile to writeTextFile but kept the original function for backwards compatibility.