Added daemon mode to second thread.