Index: trunk/FACT++/www/smartfact/index.php
===================================================================
--- trunk/FACT++/www/smartfact/index.php	(revision 14225)
+++ trunk/FACT++/www/smartfact/index.php	(revision 14226)
@@ -183,10 +183,7 @@
         // Logging (mainly for debugging)
         $d = date("Y/m");
-
         $path = "log/".$d;
-
         if (!file_exists($path))
             mkdir($path, 0777, true);
-
         $file = fopen($path."/exec.log", "a");
         fwrite($file, $cmd."\n".$str."\n\n");
@@ -203,8 +200,16 @@
         // Execute
         $str = exec($cmd, $out, $rc);
+
+        // Logging (mainly for debugging)
+        $d = date("Y/m");
+        $path = "log/".$d;
+        if (!file_exists($path))
+            mkdir($path, 0777, true);
+        $file = fopen($path."/exec.log", "a");
+        fwrite($file, $cmd."\n".$str."\n\n");
+        fclose($file);
     }
 
     // -------------------------------------------
-
 }
 
