Stubbed out the calls to fs.writeFile() using sinon module