make chronosync a dependency

refs: #2400

Change-Id: I8b488f165a4f9a2c9a7731931be3b6d2e3c43c89
diff --git a/src/nlsr-runner.cpp b/src/nlsr-runner.cpp
index 100cf72..d5bf709 100644
--- a/src/nlsr-runner.cpp
+++ b/src/nlsr-runner.cpp
@@ -43,7 +43,7 @@
   ConfFileProcessor configProcessor(m_nlsr, m_nlsr.getConfFileName());
 
   if (!configProcessor.processConfFile()) {
-    throw Error("Error in configuration file processing! Exiting from NLSR");
+    BOOST_THROW_EXCEPTION(Error("Error in configuration file processing! Exiting from NLSR"));
   }
 
   if (m_nlsr.getConfParameter().isLog4CxxConfAvailable()) {
@@ -53,16 +53,16 @@
     INIT_LOGGERS(m_nlsr.getConfParameter().getLogDir(), m_nlsr.getConfParameter().getLogLevel());
   }
 
-  m_nlsr.initialize();
-
   if (m_nlsr.getIsSetDaemonProcess()) {
     m_nlsr.daemonize();
   }
 
+  m_nlsr.initialize();
+
   try {
     m_nlsr.startEventLoop();
   }
-  catch (std::exception& e) {
+  catch (const std::exception& e) {
     _LOG_FATAL("ERROR: " << e.what());
     std::cerr << "ERROR: " << e.what() << std::endl;