diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index 64ff53c6668f0ce7f6798779d97f28c30db5c4be..cf92a8a42b14c0ded1384d3eeb614cebf53cc33a 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -1621,10 +1621,11 @@ class project extends base {
         $sReturn.=$this->_execAndSend("ls -lisa $sTempBuildDir");
 
         if (!$this->_iRcAll == 0) {
-            $this->_TempDelete($sTempBuildDir);
-            $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir) . $sReturn;
+            $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
             $this->_logaction($sError, __FUNCTION__, "error");
-            return $this->_oHtml->getBox("error", $sError);
+            $this->_TempFill($sError.$sReturn, $aActionList);
+            $this->_TempDelete($sTempBuildDir);
+            return $this->_oHtml->getBox("error", $sError.$sReturn);
         }
 
         // --------------------------------------------------
@@ -1661,6 +1662,7 @@ class project extends base {
             if (!$this->_iRcAll == 0) {
                 $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
                 $this->_logaction($sError, __FUNCTION__, "error");
+                $this->_TempFill($sError.$sReturn, $aActionList);
                 $this->_TempDelete($sTempBuildDir);
                 return $this->_oHtml->getBox("error", $sError . $sReturn);
             }
@@ -1695,10 +1697,11 @@ class project extends base {
             // $this->_iRcAll = 0;
             $sReturn.=$this->_execAndSend('bash --login -c \'' . $sSetEnv.' '.$sTempBuildDir . '/' . $sHookfile . '\'');
             if (!$this->_iRcAll == 0) {
-                $this->_TempDelete($sTempBuildDir);
-                $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir) . $sReturn;
+                $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
                 $this->_logaction($sError, __FUNCTION__, "error");
-                return $this->_oHtml->getBox("error", $sError);
+                $this->_TempFill($sError.$sReturn, $aActionList);
+                $this->_TempDelete($sTempBuildDir);
+                return $this->_oHtml->getBox("error", $sError . $sReturn);
             }
         } else {
             $sReturn.=t('skip') . '<br>';
@@ -1740,17 +1743,19 @@ class project extends base {
             }
 
             if (!$sWebroot) {
-                $this->_TempDelete($sTempBuildDir);
                 $sError = t('class-project-error-build-docroot-not-found');
                 $this->_logaction($sError, __FUNCTION__, "error");
+                $this->_TempFill($sError.$sReturn, $aActionList);
+                $this->_TempDelete($sTempBuildDir);
                 return $this->_oHtml->getBox("error", $sError . $sReturn . $sError);
             }
         }
         if (!$this->_iRcAll == 0) {
-            $this->_TempDelete($sTempBuildDir);
-            $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir) . $sReturn;
+            $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
             $this->_logaction($sError, __FUNCTION__, "error");
-            return $this->_oHtml->getBox("error", $sError);
+            $this->_TempFill($sError.$sReturn, $aActionList);
+            $this->_TempDelete($sTempBuildDir);
+            return $this->_oHtml->getBox("error", $sError . $sReturn);
         }
         // $sReturn.=$this->_oHtml->getBox("success", "preparations ok - directory is ready for packaging now.");
         // generate info file
@@ -1795,9 +1800,11 @@ class project extends base {
         }
         $sReturn.=$this->_execAndSend("ls -ld " . dirname($sPackageFileArchiv));
         if (!file_exists(dirname($sPackageFileArchiv))) {
-            $this->_TempDelete($sTempBuildDir);
+            
             $sError = sprintf(t('"class-project-error-build-dir-was-not-created"'), $sTempBuildDir);
             $this->_logaction($sError, __FUNCTION__, "error");
+            $this->_TempFill($sError.$sReturn, $aActionList);
+            $this->_TempDelete($sTempBuildDir);
             return $this->_oHtml->getBox("error", $sError . $sReturn);
         }
         $this->_TempFill($sReturn, $aActionList);
@@ -1828,9 +1835,10 @@ class project extends base {
         // TEST
         // $this->_iRcAll=1;
         if (!$this->_iRcAll == 0) {
-            $this->_TempDelete($sTempBuildDir);
             $sError = t('class-project-error-build-packaging-failed');
             $this->_logaction($sError, __FUNCTION__, "error");
+            $this->_TempFill($sError.$sReturn, $aActionList);
+            $this->_TempDelete($sTempBuildDir);
             return $this->_oHtml->getBox("error", $sError . $sReturn);
         }
         $aActionList['iActive'] ++;