Index: branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/dvo_client.c
===================================================================
--- branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/dvo_client.c	(revision 35248)
+++ branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/dvo_client.c	(revision 35249)
@@ -39,4 +39,8 @@
     remove_argument (N, argc, argv);
   }
+  if (!HOST_ID) {
+    fprintf (stderr, "ERROR: dvo_client requires a -hostID value\n");
+    exit (3);
+  }
 
   HOSTDIR = NULL;
@@ -45,4 +49,8 @@
     HOSTDIR = strcreate (argv[N]);;
     remove_argument (N, argc, argv);
+  }
+  if (!HOSTDIR) {
+    fprintf (stderr, "ERROR: dvo_client requires a -hostdir value\n");
+    exit (3);
   }
 
Index: branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mextract.c	(revision 35248)
+++ branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mextract.c	(revision 35249)
@@ -1,7 +1,3 @@
 # include "dvoshell.h"
-
-int SaveImageMetadata () {
-
-}
 
 int field_needs_images (dbField *field) {
@@ -20,5 +16,5 @@
     if (field->ID == MEAS_CENTER_OFFSET)  return TRUE; // 0.5*NX, 0.5*NY
     if (field->ID == MEAS_EXPNAME_AS_INT) return TRUE; // expname (or as int)
-    mean airmass;
+    if (field->ID == MEAS_AIRMASS)        return TRUE; // airmass
     return FALSE;
 }
@@ -56,4 +52,11 @@
     remove_argument (N, &argc, argv);
     VERBOSE = TRUE;
+  }
+
+  char *imageMetadataFile = FALSE;
+  if ((N = get_argument (argc, argv, "-image-metadata"))) {
+    remove_argument (N, &argc, argv);
+    imageMetadataFile = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
   }
 
@@ -89,5 +92,6 @@
 
   // init locally static variables (time refs)
-  dbExtractMeasuresInit();
+  // HOST_ID tells library if operation is on remote client or not
+  dbExtractMeasuresInit(HOST_ID);
 
   // command-line is of the form: mextract field,field, field [where (field op value)...]
@@ -149,5 +153,5 @@
 
       char *filename = abspath("image.metadata.fits", DVO_MAX_PATH);
-      SaveImageMetadata (filename, image, Nimage);
+      ImageMetadataSave (filename, image, Nimage);
       argc += 2;
       argv[argc-2] = strcreate ("-image-metadata");
@@ -171,11 +175,10 @@
   }
 
-  if (REMOTE_CLIENT) {
-    if (loadImages) {
-      ImageMetadata = *imageMetadata = LoadImageMetadata (filename, &Nimages);
-      if (!imageMetadata) goto escape;
-      SetImageMetadata (imageMetadata, Nimages);
-  } else {
-    if (loadImages && !SetImageSelection (TRUE, selection)) goto escape;
+  if (loadImages) {
+    if (HOST_ID) {
+      if (!SetImageMetadataSelection (imageMetadataFile)) goto escape;
+    } else {
+      if (!SetImageSelection (TRUE, selection)) goto escape;
+    }
   }
 
@@ -294,4 +297,5 @@
   free (stack);
   FreeImageSelection ();
+  FreeImageMetadataSelection ();
   SkyListFree (skylist);
   FreeSkyRegionSelection (selection);
@@ -307,4 +311,5 @@
   free (stack);
   FreeImageSelection ();
+  FreeImageMetadataSelection ();
   SkyListFree (skylist);
   FreeSkyRegionSelection (selection);
Index: branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmatch.c
===================================================================
--- branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmatch.c	(revision 35248)
+++ branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmatch.c	(revision 35249)
@@ -73,5 +73,6 @@
 
   // init locally static variables (time refs)
-  dbExtractMeasuresInit();
+  // HOST_ID tells library if operation is on remote client or not
+  dbExtractMeasuresInit(HOST_ID);
 
   // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results
Index: branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmextract.c
===================================================================
--- branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmextract.c	(revision 35248)
+++ branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmextract.c	(revision 35249)
@@ -46,5 +46,5 @@
   
   // init locally static variables (time refs)
-  dbExtractMeasuresInit();
+  dbExtractMeasuresInit(HOST_ID);
 
   // parse skyregion options
