diff --git a/install-mpsd-software-environment.py b/install-mpsd-software-environment.py
index 0165909196b1e2de357607ce7910e1181596c089..bcfb1defee3104b8ec5b54fa3da76b618cb6bd2f 100755
--- a/install-mpsd-software-environment.py
+++ b/install-mpsd-software-environment.py
@@ -49,16 +49,20 @@ def setup_log_cmd(shared_var):
     # 2023-02-29T23:32:01, install-software-environment.py --release dev-23a --install ALL
     # Software environment installer branch: script_branch (commit hash: script_commit_hash)
     # Spack environments branch: dev-23a (commit hash: spe_commit_hash)
+    # MSGs
     with open(config_vars['cmd_log_file'], "a") as f:
-        f.write("-" * 50 + "\n")
-        cmd_line = " ".join(sys.argv)
-        f.write(f"{datetime.datetime.now().isoformat()}, {cmd_line}\n")
-        f.write(
-            f"Software environment installer branch: {shared_var['script_branch']} (commit hash: {shared_var['script_commit_hash']})\n"
-        )
-        f.write(
-            f"Spack environments branch: {shared_var['spe_branch']} (commit hash: {shared_var['spe_commit_hash']})\n"
-        )
+        if msg:
+            f.write(msg + "\n")
+        else:
+            f.write("-" * 50 + "\n")
+            cmd_line = " ".join(sys.argv)
+            f.write(f"{datetime.datetime.now().isoformat()}, {cmd_line}\n")
+            f.write(
+                f"Software environment installer branch: {shared_var['script_branch']} (commit hash: {shared_var['script_commit_hash']})\n"
+            )
+            f.write(
+                f"Spack environments branch: {shared_var['spe_branch']} (commit hash: {shared_var['spe_commit_hash']})\n"
+            )
 
 
 class builder: