title: How to append to New Line in Node.js
body: <p>I'm trying to Append data to a Log file using Node.js and that is working fine but it is not going to the next line.  <code>\n</code> doesn't seem to be working in my function below. Any suggestions?</p>
  
  <pre><code>function processInput ( text ) 
  {     
    fs.open('H://log.txt', 'a', 666, function( e, id ) {
     fs.write( id, text + "\n", null, 'utf8', function(){
      fs.close(id, function(){
       console.log('file is updated');
      });
     });
    });
   }
  </code></pre>