Index: /trunk/psModules/src/objects/pmSourceIO.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO.c	(revision 11302)
+++ /trunk/psModules/src/objects/pmSourceIO.c	(revision 11303)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-01-26 00:05:18 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-01-26 04:40:42 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -323,5 +323,12 @@
         psFree (exttype);
 
-        pmSourcesWriteCMF (file->fits, sources, outhead, dataname);
+        if (!pmSourcesWriteCMF (file->fits, sources, outhead, dataname)) {
+            psError(PS_ERR_IO, false, "writing CMF data to %s\n", file->filename);
+            psFree (headname);
+            psFree (dataname);
+            psFree (outhead);
+            return false;
+        }
+
         psTrace ("pmFPAfile", 5, "wrote ext data %s (type: %d)\n", file->filename, file->type);
 
