title: How to handle concurrent file write requests on a node server with socket.io
body: <p>How to handle concurrent file write requests on a node server with socket.io. I am using this to write:</p>
  
  <pre><code>fs.writefile('abc.txt','datatobewritten','utf8',function(err){});
  </code></pre>
  
  <p>I have a file abc.txt and suppose two users try to write on the same time on this file then I am getting an error, so how do I queue multiple requests.</p>