Callback function after image has downloaded
You want to create the stream ahead of time and then do something on the close event.
var picStream = fs.createWriteStream('doodle.png');
picStream.on('close', function() {
console.log('file done');
});
request('http://google.com/images/logos/ps_logo2.png').pipe(picStream);
This should do it.