Here we should simply remove the `fs.exists` check and try the `unlinkSync` immediately, and then handle a possible error. As is, it's a race condition - the file could be deleted in between the time that you check that it exists and you try to unlink it.