public void Shutdown()
 {
     EventManager.Publish(ServiceHostState.Shutdown);
     Thread.Sleep(5 * 1000);
     profileStore.Flush();
 }