add example for writeFile()