Index: trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c	(revision 27585)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c	(revision 27588)
@@ -248,5 +248,8 @@
   /* rewind file pointers and truncate */
   fseeko (f, 0LL, SEEK_SET);
-  ftruncate (fileno (catalog[0].f), 0);
+  if (ftruncate (fileno (catalog[0].f), 0)) {
+    if (VERBOSE) fprintf (stderr, "failed to truncate file\n");
+    goto failure;
+  }
   ftable.header = &header;
 
Index: trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 27585)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 27588)
@@ -285,5 +285,8 @@
   f = catalog[0].f;
   fseeko (f, 0, SEEK_SET);
-  ftruncate (fileno (catalog[0].f), 0);
+  if (ftruncate (fileno (catalog[0].f), 0)) {
+    if (VERBOSE) fprintf (stderr, "failed to truncate file\n");
+    goto failure;
+  }
 
   /* write header data (use gfits_write_header?) */
