Working with various streams in Node.js