Index: trunk/MagicSoft/Mars/mjobs/MJCut.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 8709)
+++ trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 8719)
@@ -550,4 +550,7 @@
         return kFALSE;
     }
+
+    if (!HasWritePermission(GetOutputFile(set.GetNumAnalysis())))
+        return kFALSE;
 
     CheckEnv();
Index: trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc	(revision 8709)
+++ trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc	(revision 8719)
@@ -1009,5 +1009,5 @@
     spectrum.SetMarkerStyle(kFullDotMedium);
     spectrum.SetTitle("Differential flux times E^{2}");
-    spectrum.SetYTitle("E^{2}#cdot dN/dE [N#cdot TeV/sm^{2}]");
+    spectrum.SetYTitle("E^{2}·dN/dE [N·TeV/sm^{2}]");
     spectrum.SetDirectory(0);
     spectrum.DrawCopy();
@@ -1316,4 +1316,7 @@
     }
 
+    if (!HasWritePermission(GetPathOut()))
+        return kFALSE;
+
     CheckEnv();
 
@@ -1324,4 +1327,7 @@
     *fLog << "Compile Monte Carlo Sample (data set " << set.GetName() << ")" << endl;
     *fLog << endl;
+
+    if (fDisplay)
+        fDisplay->SetWindowName(fName);
 
     // Setup everything which is read from the ganymed file
@@ -1616,5 +1622,5 @@
     tlist2.SetAccelerator(MTask::kAccDontReset|MTask::kAccDontTime);
 
-    MEvtLoop loop2("FillMonteCarlo"); // ***** fName *****
+    MEvtLoop loop2(fName); // ***** fName *****
     loop2.SetParList(&plist);
     loop2.SetDisplay(fDisplay);
@@ -1685,4 +1691,13 @@
         cont.Add(fDisplay);
 
-    return WriteContainer(cont, "", "RECREATE");
-}
+    if (!WriteContainer(cont, "", "RECREATE"))
+    {
+        *fLog << err << GetDescriptor() << ": Writing result failed." << endl;
+        return kFALSE;
+    }
+
+    *fLog << all << GetDescriptor() << ": Done." << endl;
+    *fLog << endl << endl;
+
+    return kTRUE;
+}
Index: trunk/MagicSoft/Mars/mjobs/MJob.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJob.cc	(revision 8709)
+++ trunk/MagicSoft/Mars/mjobs/MJob.cc	(revision 8719)
@@ -329,5 +329,5 @@
 //
 // Checks whether write permissions to fname exists including
-// the fOverwrite data amember.
+// the fOverwrite data member. Empty file names return kTRUE
 //
 Bool_t MJob::HasWritePermission(TString fname) const
@@ -346,5 +346,5 @@
     }
 
-    if (!fOverwrite)
+    if (fOverwrite)
         return kTRUE;
 
