Index: trunk/Ohana/src/getstar/src/getstar.c
===================================================================
--- trunk/Ohana/src/getstar/src/getstar.c	(revision 20364)
+++ trunk/Ohana/src/getstar/src/getstar.c	(revision 20532)
@@ -26,6 +26,21 @@
   // this has to be here because the 'open' inits the catalog (perhaps not ideal)
   if (!strcmp (OUTFORMAT, "CATALOG")) {
-    unlink (OUTPUT);
-    dvo_catalog_open   (&output, NULL, VERBOSE, "w");
+      int length;
+      char *filename, *path, *root;
+      // we need to unlink the files, otherwise dvo_catalog_open ("w") will error if they exist
+      unlink (output.filename);
+      if (output.catmode == DVO_MODE_SPLIT) {
+	  path = pathname (output.filename);
+	  root = filerootname (output.filename);
+	  length = strlen(path) + strlen(root) + 6;
+	  ALLOCATE (filename, char, length);
+	  sprintf (filename, "%s/%s.cpm", path, root);
+	  unlink (filename);
+	  sprintf (filename, "%s/%s.cpn", path, root);
+	  unlink (filename);
+	  sprintf (filename, "%s/%s.cps", path, root);
+	  unlink (filename);
+      }
+      dvo_catalog_open   (&output, NULL, VERBOSE, "w");
   }
 
