added setTimeout before executing handler to let node jump into the event loop more often