How to properly handle node.done()