diff --git a/tests/test_mpsd_software.py b/tests/test_mpsd_software.py
index 087c81e73046f6b74190a95ff2faa052d668280a..b022c6016e6775f7cb61965647045c073981a7ff 100644
--- a/tests/test_mpsd_software.py
+++ b/tests/test_mpsd_software.py
@@ -160,8 +160,17 @@ def test_prepare_environment(tmp_path):
         )
 
 
+def test_write_to_cmd_log(tmp_path):
+    """Check that we write to the correct log file"""
+    cmd_log_file = mod.config_vars["cmd_log_file"]
+    mod.write_to_cmd_log(root_dir=tmp_path, msg="test_cmd")
+    assert os.path.exists(tmp_path / cmd_log_file)
+    with open(tmp_path / cmd_log_file, "r") as f:
+        assert "test_cmd" in f.read()
+
+
 def test_record_script_execution_summary(tmp_path):
-    """Check that log is updated.
+    """Check that cmd log is updated with header
 
     Check that logs/install-software-environment.log is updated when the module is run
     """