Using setImmediate instead of process.nextTick