title: Node.js request download file sometimes empty or no existing
body: <p>I'm writing a downloader with node.js and the request module. Using the stream syntax I'm doing</p>
  
  <pre><code>var r = request(url).pipe(fs.createWriteStream(targetPath));
  r.on('error', function(err) { console.log(err); });
  r.on('finish', cb);
  </code></pre>
  
  <p>to download the file, save it and call the callback. However, in almost 50% of the cases the file is either empty or not created at all. No <code>error</code> event is emitted. It seems like the <code>finish</code> event is triggered even though the file wasn't (completely) written yet.</p>
  
  <p>Context: The whole thing is wrapped into <code>async.each</code> calls.</p>
  
  <p>Any clues? Thanks!</p>