Index: /trunk/psastro/src/psastroMosaicAstrom.c
===================================================================
--- /trunk/psastro/src/psastroMosaicAstrom.c	(revision 27557)
+++ /trunk/psastro/src/psastroMosaicAstrom.c	(revision 27558)
@@ -1,5 +1,5 @@
 /** @file psastroMosaicAstrom.c
  *
- *  @brief 
+ *  @brief
  *
  *  @ingroup libpsastro
@@ -43,7 +43,7 @@
     if (!status) psAbort ("missing config value");
 
-    // this should be in a loop with nIter = 
+    // this should be in a loop with nIter =
     for (int iter = 0; iter < nIter; iter++) {
-	if (!psastroMosaicFit (fpa, recipe, outroot, iter)) return false;
+        if (!psastroMosaicFit (fpa, recipe, outroot, iter)) return false;
     }
 
@@ -60,7 +60,7 @@
 
     if (psTraceGetLevel("psastro.dump") > 0) {
-	// the last filename (see filenames in psastroMosaicFit)
-	char filename[256];
-	snprintf (filename, 256, "%s.%d.dat", outroot, 2*nIter + 2);
+        // the last filename (see filenames in psastroMosaicFit)
+        char filename[256];
+        snprintf (filename, 256, "%s.%d.dat", outroot, 2*nIter + 2);
         psastroDumpMatches (fpa, filename);
     }
@@ -75,5 +75,6 @@
     }
     if (!pmAstromWriteBilevelMosaic (updates, fpa, NONLIN_TOL)) {
-        psAbort ("failed to save header terms");
+        psError(psErrorCodeLast(), false, "Failed to save header terms");
+        return false;
     }
 
