-- cleanup
Support full options object
`intermediate` option for writeFile