title: I want to remove one file after creating it --- node js integration testing
body: <p>I am implementing integration test for logger(winston) using mocha framework. </p>
  
  <p>Suppose I am using <code>logger.error</code>. and using this, one file is creating.</p>
  
  <p>I have to check the file is created or not &lt;-- i am able to do it</p>
  
  <p>But I have to delete this file after checking the existance of it.</p>
  
  <pre><code>// on file is created and logged the data
  logger.error("module.testnamespace.info", "Info message", 1231, 12313); 
  
  // Checking the existance of that file
  fs.exists(filePath, function (exists) {
      should(exists).equal(true, 'Log File should exist');
  });
  
  // I want to delete that file
  fs.unlinkSync(filePath);
  </code></pre>
  
  <p>But here I am getting this error</p>
  
  <pre><code> 1) 1. Integration Test Cases for logger wrapper : for `info` method A. Integration Test Cases for logger wrapper : for `info` method a. Check logger file is creating or not:
       Error: ETXTBSY, text file is busy '/web/log/rpc-test.log.2014-12-08'
        at Object.fs.unlinkSync (fs.js:760:18)
        at Context.&lt;anonymous&gt; (/web/gin/mochaTest/rpcTest/logger_rpc_test.js:49:10)
        at Test.Runnable.run (/web/gin/node_modules/mocha/lib/runnable.js:194:15)
        at Runner.runTest (/web/gin/node_modules/mocha/lib/runner.js:372:10)
        at /web/gin/node_modules/mocha/lib/runner.js:448:12
        at next (/web/gin/node_modules/mocha/lib/runner.js:297:14)
        at /web/gin/node_modules/mocha/lib/runner.js:307:7
        at next (/web/gin/node_modules/mocha/lib/runner.js:245:23)
        at Object._onImmediate (/web/gin/node_modules/mocha/lib/runner.js:274:5)
        at processImmediate [as _immediateCallback] (timers.js:336:15)
  </code></pre>