Add writeFile function to folly