Enable running the listener in a separate thread