Index: branches/eam_branches/relastro.20100326/src/MosaicOps.c
===================================================================
--- branches/eam_branches/relastro.20100326/src/MosaicOps.c	(revision 27487)
+++ branches/eam_branches/relastro.20100326/src/MosaicOps.c	(revision 27497)
@@ -146,5 +146,8 @@
 
     Nmos = getMosaicByTimes (start, stop, startMos, stopMos, indexMos);
-    if (Nmos == -1) continue;
+    if (Nmos == -1) {
+      fprintf (stderr, "cannot match mosaic for %s\n", image[i].name);
+      continue;
+    }
 
     // mosaic corresponding to this image
@@ -185,4 +188,8 @@
     // this function does the reverse-lookup for the mosaic corresponding to this image
     new = getImageRaw (catalog, Ncatalog, im, &Nnew, MODE_MOSAIC);
+    if (!new) {
+      fprintf (stderr, "inconsistent: missing mosaic for image already associated with a mosaic? (1)\n");
+      abort();
+    }
     
     // merge new and raw
@@ -217,4 +224,8 @@
     // this function does the reverse-lookup for the mosaic corresponding to this image
     new = getImageRef (catalog, Ncatalog, im, &Nnew, MODE_MOSAIC);
+    if (!new) {
+      fprintf (stderr, "inconsistent: missing mosaic for image already associated with a mosaic? (2)\n");
+      abort();
+    }
     
     // merge new and ref
