diff --git a/logging_setup.py b/logging_setup.py
index 0b9a6baf201e536b16d2e745e23a4a5dcc797159..8ca053992e1446afb5c42b8e0584710903187f5e 100644
--- a/logging_setup.py
+++ b/logging_setup.py
@@ -51,7 +51,10 @@ def setup_loggers(mqtt=True):
     if logging_to_console:
         exec_logger.addHandler(logging.StreamHandler())
     if mqtt:
-        mqtt_msg_handler = MQTTHandler(MQTT_LOGGING_CONFIG['hostname'], MQTT_LOGGING_CONFIG['exec_topic'])
+        mqtt_settings = MQTT_LOGGING_CONFIG.copy()
+        [mqtt_settings.pop(i) for i in ['client_id', 'exec_topic', 'data_topic', 'soh_topic']]
+        mqtt_settings.update({'topic':MQTT_LOGGING_CONFIG['exec_topic']})
+        mqtt_msg_handler = MQTTHandler(**mqtt_settings)
         mqtt_msg_handler.setLevel(logging_level)
         mqtt_msg_handler.setFormatter(exec_formatter)
         exec_logger.addHandler(mqtt_msg_handler)
@@ -75,7 +78,10 @@ def setup_loggers(mqtt=True):
     if logging_to_console:
         data_logger.addHandler(logging.StreamHandler())
     if mqtt:
-        mqtt_data_handler = MQTTHandler(MQTT_LOGGING_CONFIG['hostname'], MQTT_LOGGING_CONFIG['data_topic'])
+        mqtt_settings = MQTT_LOGGING_CONFIG.copy()
+        [mqtt_settings.pop(i) for i in ['client_id', 'exec_topic', 'data_topic', 'soh_topic']]
+        mqtt_settings.update({'topic': MQTT_LOGGING_CONFIG['data_topic']})
+        mqtt_data_handler = MQTTHandler(**mqtt_settings)
         mqtt_data_handler.setLevel(logging_level)
         mqtt_data_handler.setFormatter(data_formatter)
         data_logger.addHandler(mqtt_data_handler)
diff --git a/mqtt_controller.py b/mqtt_controller.py
index aadb0f4aeb68d4a4f8db184320c63cf2d973d458..13b6a086ee8bdc9408288617a27ebb97fe8cc490 100644
--- a/mqtt_controller.py
+++ b/mqtt_controller.py
@@ -6,7 +6,7 @@ from config import MQTT_CONTROL_CONFIG, OHMPI_CONFIG
 import time
 import uuid
 
-client = mqtt.Client(f'ohmpi_{OHMPI_CONFIG["id"]}_controller')  # create new instance
+client = mqtt.Client(f'ohmpi_{OHMPI_CONFIG["id"]}_controller', clean_session=False)  # create new instance
 print('connecting to broker')
 client.connect(MQTT_CONTROL_CONFIG['hostname'])
 client.loop_start()
diff --git a/mqtt_interface.py b/mqtt_interface.py
index a6b525859301014ce077663d4dfff644a166a3f6..916a964c623a1c5eeb0efe80b5b6f729b3a709cd 100644
--- a/mqtt_interface.py
+++ b/mqtt_interface.py
@@ -19,7 +19,7 @@ def on_message(client, userdata, message):
     print(f'Received reply {message.payload.decode("utf-8")}: {reply}')
 
 
-mqtt_client = mqtt.Client(f'ohmpi_{OHMPI_CONFIG["id"]}_listener')  # create new instance
+mqtt_client = mqtt.Client(f'ohmpi_{OHMPI_CONFIG["id"]}_listener', clean_session=False)  # create new instance
 print('connecting to broker')
 mqtt_client.connect(MQTT_CONTROL_CONFIG['hostname'])
 print('Subscribing to topic', MQTT_CONTROL_CONFIG['ctrl_topic'])
diff --git a/mqtt_logger.py b/mqtt_logger.py
index 10cbbc9d10258ba80b7d26fab0fe4466ff56771a..8bde814de52348a5d1c399899f3a7ffbe9a253e9 100644
--- a/mqtt_logger.py
+++ b/mqtt_logger.py
@@ -44,6 +44,7 @@ class MQTTHandler(logging.Handler):
         self.tls = tls
         self.protocol = protocol
         self.transport = transport
+        print(f'init logger QoS={self.qos}')
 
     def emit(self, record):
         """
diff --git a/ohmpi.py b/ohmpi.py
index 81dd8eb945f251025552c3d84cd082ad9e421030..bddcfae9b89af51f44ec6bcd8045104f6e9fa491 100644
--- a/ohmpi.py
+++ b/ohmpi.py
@@ -645,6 +645,7 @@ class OhmPi(object):
         while True:
             message = socket.recv()
             print(f'Received command: {message}')
+            e = None
             try:
                 cmd_id = None
                 decoded_message = json.loads(message.decode('utf-8'))
@@ -658,6 +659,7 @@ class OhmPi(object):
                         self._update_acquisition_settings(args)
                     elif cmd == 'start':
                         self.measure(cmd_id)
+                        self.stop()
                         status = True
                     elif cmd == 'stop':
                         self.stop()
@@ -680,19 +682,18 @@ class OhmPi(object):
                             status = True
                         except Exception as e:
                             self.exec_logger.warning(f'Unable to run rs-check: {e}')
+                    else:
+                        self.exec_logger.warning(f'Unkown command {cmd} - cmd_id: {cmd_id}')
             except Exception as e:
                 self.exec_logger.warning(f'Unable to decode command {message}: {e}')
                 status = False
             finally:
                 reply = {'cmd_id': cmd_id, 'status': status}
-                if not status:
-                    reply.update({'Exception': e})
                 reply = json.dumps(reply)
+                print(reply)
                 self.exec_logger.debug(reply)
                 reply = bytes(reply, 'utf-8')
                 socket.send(reply)
-
-            print(cmd_id)
             #  Do some 'work'
             time.sleep(.1)