Index: /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_regions.c
===================================================================
--- /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_regions.c	(revision 36549)
+++ /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_regions.c	(revision 36550)
@@ -12,4 +12,8 @@
   // load the RegionTable (UserRegion should not be used at this level)
   RegionHostTable *regionHosts = RegionHostTableLoad (CATDIR, REGION_FILE);
+  if (!regionHosts) {
+    fprintf (stderr, "ERROR: problem with region host table\n");
+    exit (2);
+  }
 
   // load the flat correction table (if defined)
@@ -28,4 +32,5 @@
 
   /* lock and load the image db table */
+  // XXX add optional case in which we do not update the db?
   status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT));
   if (!status && UPDATE) {
@@ -54,12 +59,18 @@
   slurp_image_mags (regionHosts, -1);
 
+  if (!UPDATE) { 
+    dvo_image_unlock (&db); 
+    MARKTIME ("finished relphot -parallel-regions: %f sec total\n", dtime);
+    fprintf (stderr, "NOTE: UPDATE is OFF (results are not saved)\n");
+    exit (0);
+  }
+
   /* update catalogs (in parallel) */
   reload_catalogs (skylist, flatcorr, 0, NULL);
 
-  // do not save changes if we did not make changes. 
-  dvo_image_update (&db, VERBOSE);
-
-  if (!UPDATE) dvo_image_unlock (&db); 
+  // save the changes to the image parameters
+  dvo_image_save (&db, VERBOSE);
   dvo_image_unlock (&db); 
+  MARKTIME ("finished relphot -parallel-regions: %f sec total\n", dtime);
 
   exit (0);
