diff --git a/gui/chronosharegui.cpp b/gui/chronosharegui.cpp
index ef4af73..8df191f 100644
--- a/gui/chronosharegui.cpp
+++ b/gui/chronosharegui.cpp
@@ -107,7 +107,8 @@
   m_trayIcon->show();
 
   // load settings
-  if (!loadSettings()) {
+  if (!loadSettings() || m_username.isNull() || m_username == "" || m_sharedFolderName.isNull() ||
+      m_sharedFolderName == "" || m_dirPath.isNull() || m_dirPath == "") {
     // prompt user to choose folder
     openMessageBox("First Time Setup",
                    "Please enter a username, shared folder name and choose the shared folder path on your local filesystem.");
@@ -116,15 +117,7 @@
     viewSettings();
   }
   else {
-    if (m_username.isNull() || m_username == "" || m_sharedFolderName.isNull() ||
-        m_sharedFolderName == "") {
-      openMessageBox("First Time Setup",
-                     "To activate ChronoShare, please configure your username and shared folder name.");
-      viewSettings();
-    }
-    else {
-      startBackend();
-    }
+    startBackend();
   }
 }
 
@@ -146,6 +139,10 @@
     m_watcher.reset();    // stop filewatching ASAP
     m_dispatcher.reset(); // stop dispatcher ASAP, but after watcher(to prevent triggering callbacks
                           // on deleted object)
+    m_ioServiceWork.reset();
+    m_ioSerciceManager->handle_stop();
+    m_NetworkThread.join();
+    delete m_ioSerciceManager;
   }
 
   fs::path realPathToFolder(m_dirPath.toStdString());
@@ -164,6 +161,21 @@
   m_watcher.reset(new FsWatcher(*m_ioService, realPathToFolder.string().c_str(),
                                 bind(&Dispatcher::Did_LocalFile_AddOrModify, m_dispatcher.get(), _1),
                                 bind(&Dispatcher::Did_LocalFile_Delete, m_dispatcher.get(), _1)));
+  try {
+    m_ioSerciceManager = new IoServiceManager(*m_ioService);
+    m_NetworkThread = std::thread(&IoServiceManager::run, m_ioSerciceManager);
+  }
+  catch (const std::exception& e) {
+    _LOG_ERROR("Start IO service or Face failed");
+    openWarningMessageBox("", "WARNING: Cannot allocate thread for face and io_service!",
+                          QString("Starting chronoshare failed"
+                                  "Exception caused: %1")
+                            .arg(e.what()));
+    // stop filewatching ASAP
+    m_watcher.reset();
+    m_dispatcher.reset();
+    return;
+  }
 
   if (m_httpServer != 0) {
     // no need to restart webserver if it already exists
@@ -176,18 +188,14 @@
       m_httpServer = new http::server::server(HTTP_SERVER_ADDRESS, HTTP_SERVER_PORT, DOC_ROOT);
       m_httpServerThread = std::thread(&http::server::server::run, m_httpServer);
     }
-    catch (std::exception& e) {
+    catch (const std::exception& e) {
       _LOG_ERROR("Start http server failed");
       m_httpServer = 0; // just to make sure
-      QMessageBox msgBox;
-      msgBox.setText("WARNING: Cannot start http server!");
-      msgBox.setIcon(QMessageBox::Warning);
-      msgBox.setInformativeText(
-        QString("Starting http server failed. You will not be able to check history from web "
-                "brower. Exception caused: %1")
-          .arg(e.what()));
-      msgBox.setStandardButtons(QMessageBox::Ok);
-      msgBox.exec();
+      openWarningMessageBox("WARNING", "WARNING: Cannot start http server!",
+                            QString("Starting http server failed. You will "
+                                    "not be able to check history from web "
+                                    "brower. Exception caused: %1")
+                              .arg(e.what()));
     }
   }
   else {
@@ -203,6 +211,12 @@
   // stop dispatcher ASAP, but after watcher to prevent triggering callbacks on the deleted object
   m_dispatcher.reset();
 
+  m_ioServiceWork.reset();
+  m_ioSerciceManager->handle_stop();
+  m_chronoshareThread.join();
+  m_NetworkThread.join();
+  delete m_ioSerciceManager;
+
   if (m_httpServer != 0) {
     m_httpServer->handle_stop();
     m_httpServerThread.join();
@@ -259,6 +273,20 @@
 }
 
 void
+ChronoShareGui::openWarningMessageBox(QString title, QString text, QString infotext)
+{
+  QMessageBox messageBox(this);
+  messageBox.setWindowTitle(title);
+  messageBox.setText(text);
+  messageBox.setInformativeText(infotext);
+
+  messageBox.setIcon(QMessageBox::Warning);
+  messageBox.setStandardButtons(QMessageBox::Ok);
+
+  messageBox.exec();
+}
+
+void
 ChronoShareGui::createActionsAndMenu()
 {
   _LOG_DEBUG("Create actions");
