Index: trunk/Ohana/src/dvomerge/include/dvomerge.h
===================================================================
--- trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 34276)
+++ trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 34277)
@@ -42,4 +42,5 @@
   unsigned int *old;
   unsigned int *new;
+  char *notFound;
 } IDmapType;
 
@@ -128,2 +129,3 @@
 int        IDmapSave               PROTO((char *filename, IDmapType *IDmap));
 IDmapType *IDmapLoad               PROTO((char *filename));
+int        create_IDmap_lookup     PROTO((IDmapType *IDmap));
Index: trunk/Ohana/src/dvomerge/src/IDmapIO.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/IDmapIO.c	(revision 34276)
+++ trunk/Ohana/src/dvomerge/src/IDmapIO.c	(revision 34277)
@@ -133,4 +133,6 @@
   fprintf (stderr, "loaded data for %lld images\n", (long long) Nrow);
 
+  create_IDmap_lookup (IDmap);
+
   return IDmap;
 }
Index: trunk/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c	(revision 34276)
+++ trunk/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c	(revision 34277)
@@ -54,4 +54,6 @@
   }
 
+  create_IDmap_lookup (IDmap);
+
   FREE(TgtIndex);
   FREE(TgtTimes);
@@ -105,6 +107,9 @@
   }
 
+
   // sort IDmap->old,new on the basis of IDmap->old:
   sort_IDmap (IDmap);
+
+  create_IDmap_lookup (IDmap);
 
   if (!out[0].swapped) {
@@ -172,5 +177,10 @@
     newID = dvo_map_image_ID (IDmap, oldID);
     if (newID == 0) {
-      fprintf (stderr, "cannot find image ID "OFF_T_FMT"\n",  oldID);
+      if (!IDmap->notFound[oldID]) {
+	fprintf (stderr, "cannot find image ID "OFF_T_FMT"\n",  oldID);
+	IDmap->notFound[oldID] = TRUE;
+	// once we discover an imageID is not found, record that fact so we do not complain for every detection
+      }
+      // optionally exit here? or wait until end to report an error?
       // exit (2);
     }
@@ -242,2 +252,16 @@
 }
 
+// we need a lookup table of length (oldIDmax + 1) to record if a given oldIDmax has not been found in Tgt
+int create_IDmap_lookup (IDmapType *IDmap) {
+  
+  off_t i;
+  unsigned int oldIDmax = 0;
+
+  for (i = 0; i < IDmap->Nmap; i++) {
+    if (oldIDmax > IDmap->old[i]) continue;
+    oldIDmax = IDmap->old[i];
+  }
+  ALLOCATE (IDmap->notFound, char, oldIDmax + 1);
+  memset (IDmap->notFound, 0, sizeof(char) * (oldIDmax + 1));
+  return TRUE;
+}
