Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9002)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9003)
@@ -24,4 +24,5 @@
      - added fTelescope data member
      - increased class version number accordingly
+     - added return value to WriteFile
 
    * mjobs/MSequenceSQL.cc:
Index: trunk/MagicSoft/Mars/mjobs/MSequence.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 9002)
+++ trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 9003)
@@ -997,15 +997,24 @@
 // Print the contents of the sequence to the file with name filename
 //
-void MSequence::WriteFile(const char *name, const Option_t *o) const
+Bool_t MSequence::WriteFile(const char *name, const Option_t *o) const
 {
     ofstream fout(name);
     if (!fout)
     {
-        gLog << err << "Cannot open file " << name << ": ";
+        gLog << err << "ERROR - Cannot open file " << name << ": ";
         gLog << strerror(errno) << endl;
-        return;
+        return kFALSE;
     }
 
     Print(fout, o);
+
+    if (!fout)
+    {
+        gLog << err << "ERROR - Writing file " << name << ": ";
+        gLog << strerror(errno) << endl;
+        return kFALSE;
+    }
+
+    return kTRUE;
 }
 
Index: trunk/MagicSoft/Mars/mjobs/MSequence.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MSequence.h	(revision 9002)
+++ trunk/MagicSoft/Mars/mjobs/MSequence.h	(revision 9003)
@@ -116,6 +116,6 @@
 
     // I/O
-    void WriteFile(const char *filename, const Option_t *o) const;
-    void WriteFile(const char *filename) const { WriteFile(filename,""); } //*MENU *ARGS={filename=>fBaseName}
+    Bool_t WriteFile(const char *filename, const Option_t *o) const;
+    Bool_t WriteFile(const char *filename) const { return WriteFile(filename,""); } //*MENU *ARGS={filename=>fBaseName}
 
     // TObject
