Flow control for node.js