add callbacks to wait for plugin