How to await an event handler