Wrapping a callback in process.nextTick