Is it safe to fs.rename a file immediately after a call to fs.writeFile (but before the callback)?
The documentation didn't answer this, it only says:
Note that it is unsafe to use fs.write multiple times
on the same file without waiting for the callback.