Index: /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/Shutdown.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/Shutdown.c	(revision 38620)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/Shutdown.c	(revision 38621)
@@ -21,6 +21,4 @@
   va_end (argp);
 
-  SetProtect (TRUE);
-  if (db) gfits_db_close (db);
   fprintf (stderr, "ERROR: relphot halted\n");
   exit (1);
Index: /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/reload_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/reload_catalogs.c	(revision 38620)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/reload_catalogs.c	(revision 38621)
@@ -105,6 +105,8 @@
     free (moddate);
 
-    dvo_catalog_save (&catalog, VERBOSE); 
-    dvo_catalog_unlock (&catalog);
+    SetProtect (TRUE);
+    if (!dvo_catalog_save (&catalog, VERBOSE)) { fprintf (stderr, "ERROR: failed to save %s\n", catalog.filename); exit (1); }
+    if (!dvo_catalog_unlock (&catalog)) { fprintf (stderr, "ERROR: failed to unlock %s\n", catalog.filename); exit (1); }
+    SetProtect (FALSE);
 
     free_tiny_values(&catalog);
Index: /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot.c	(revision 38620)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot.c	(revision 38621)
@@ -4,4 +4,5 @@
 
   // get configuration info, args
+  SetSignals ();
   RelphotMode mode = initialize (argc, argv);
   if (!mode) exit (2);
Index: /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_client.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_client.c	(revision 38620)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_client.c	(revision 38621)
@@ -18,4 +18,5 @@
 
   // get configuration info, args, lockfile (set CATDIR, HOST_ID, HOSTDIR, etc) 
+  SetSignals ();
   initialize_client (argc, argv);
   client_logger_init (HOSTDIR);
Index: /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_objects.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_objects.c	(revision 38620)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_objects.c	(revision 38621)
@@ -101,6 +101,8 @@
     // but it would be better to define a dvo crawler program to do this
     // catalog.catformat = DVO_FORMAT_PS1_V1;  
-    dvo_catalog_save (&catalog, VERBOSE); 
-    dvo_catalog_unlock (&catalog);
+    SetProtect (TRUE);
+    if (!dvo_catalog_save (&catalog, VERBOSE)) { fprintf (stderr, "ERROR: failed to save %s\n", catalog.filename); exit (1); }
+    if (!dvo_catalog_unlock (&catalog)) { fprintf (stderr, "ERROR: failed to unlock %s\n", catalog.filename); exit (1); }
+    SetProtect (FALSE);
     free_tiny_values(&catalog);
     dvo_catalog_free (&catalog);
Index: /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_synthphot.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_synthphot.c	(revision 38620)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_synthphot.c	(revision 38621)
@@ -71,6 +71,8 @@
     // but it would be better to define a dvo crawler program to do this
     // catalog.catformat = DVO_FORMAT_PS1_V1;  
-    dvo_catalog_save (&catalog, VERBOSE); 
-    dvo_catalog_unlock (&catalog);
+    SetProtect (TRUE);
+    if (!dvo_catalog_save (&catalog, VERBOSE)) { fprintf (stderr, "ERROR: failed to save %s\n", catalog.filename); exit (1); }
+    if (!dvo_catalog_unlock (&catalog)) { fprintf (stderr, "ERROR: failed to unlock %s\n", catalog.filename); exit (1); }
+    SetProtect (FALSE);
     dvo_catalog_free (&catalog);
   }
