Fixing tracing in ensureServiceHasStopped and ensureServiceHasStarted