diff --git a/mpsd-software-environment.py b/mpsd-software-environment.py
index b984f678a28e6347bcfc6cdda13b4744a0b96deb..2353a5edebc45a6acc42a2a5c154c4a3372bd263 100755
--- a/mpsd-software-environment.py
+++ b/mpsd-software-environment.py
@@ -899,12 +899,12 @@ def main():
     log_folder = script_dir / mpsd_release / mpsd_microarch / "logs"
     # if the log_folder dosent exist, dont log this message if
     #  the command is a info-only command
-    if not os.path.exists(log_folder):
-        if args.action not in ["status", "available"]:
+    if args.action not in ["status", "available"]:
+        if not os.path.exists(log_folder):
             os.makedirs(log_folder)
-            installer_log_file = log_folder / installer_log_name
-        else:
-            installer_log_file = None
+        installer_log_file = log_folder / installer_log_name
+    else:
+        installer_log_file = None
 
     set_up_logging(args.loglevel, installer_log_file)