Index: src/edu/ucsb/nceas/metacat/DBValidate.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBValidate.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DBValidate.java	(revision 675)
@@ -74,7 +74,7 @@
       parser.setFeature("http://xml.org/sax/features/validation",true);
       //parser.setValidationMode(true);     // Oracle
     } catch (Exception e) {
-      System.err.println("Could not create parser!!!");
+      System.err.println("Could not create parser in DBValidate.DBValidate");
     }
   }
     
@@ -88,7 +88,9 @@
       myCatalog.loadSystemCatalogs();
       myCatalog.parseCatalog(xmlcatalogfile);
       cer.setCatalog(myCatalog);
-    } catch (Exception e) {System.out.println("Problem creating Catalog!");}
+    } catch (Exception e) {
+      System.out.println("Problem creating Catalog in DBValidate.DBValidate");
+    }
 
     parser.setEntityResolver(cer);
   }
@@ -114,7 +116,8 @@
     try {
       parser.parse((createURL(xml_doc)).toString());
     } catch (IOException e) {
-      System.out.println("IOException:Could not parse :"+xml_doc);
+      System.out.println("IOException:Could not parse :" + xml_doc +
+                         " from DBValidate.validate");
       ParseError eip = null;
       eip = new ParseError("",0,0,
                 "IOException:Could not parse :"+xml_doc);
@@ -148,7 +151,9 @@
     try {
       parser.parse(is);
     }
-    catch (Exception e) {System.out.println("Error in parsing!");}
+    catch (Exception e) {
+      System.out.println("Error in parsing in DBValidate.validateString");
+    }
 
     if (ef != null && ef.getErrorNodes()!=null && 
       ef.getErrorNodes().size() > 0 ) {
Index: src/edu/ucsb/nceas/metacat/AuthLdap.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthLdap.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/AuthLdap.java	(revision 675)
@@ -104,11 +104,12 @@
       }
 
     } catch (AuthenticationException ae) {
-      util.debugMessage("Error authenticating: " + ae);
+      util.debugMessage("Error authenticating in AuthLdap.authenticate: " + ae);
       // NEED TO THROW THE RIGHT EXCEPTION HERE
       return false;
     } catch (NamingException e) {
-      util.debugMessage("Naming exception while authenticating: " + e);
+      util.debugMessage("Naming exception while authenticating in " + 
+                        "AuthLdap.authenticate: " + e);
       // NEED TO THROW THE RIGHT EXCEPTION HERE
       return false;
     }
@@ -227,7 +228,8 @@
       // Close the context when we're done
       ctx.close();
     } catch (NamingException e) {
-      System.err.println("Problem getting attributes: " + e);
+      System.err.println("Problem getting attributes in AuthLdap.getAttributes:" 
+                          + e);
       // NEED TO THROW THE RIGHT EXCEPTION HERE
     }
 
@@ -297,6 +299,7 @@
       ctx.close();
     } catch (NamingException e) {
       util.debugMessage("Naming exception while getting dn: " + e);
+      System.out.println("Naming exception in AuthLdap.getIdentifyingName");
       // NEED TO THROW THE RIGHT EXCEPTION HERE
       return null;
     }
@@ -342,7 +345,7 @@
       }
 
     } catch (ConnectException ce) {
-      System.err.println("Error connecting to LDAP server.");
+      System.err.println("Error connecting to LDAP server in authldap.main");
     }
   }
 }
Index: src/edu/ucsb/nceas/metacat/AuthSession.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthSession.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/AuthSession.java	(revision 675)
@@ -81,8 +81,8 @@
         return false;
       }    
     } catch ( ConnectException ce ) {
-      message = "Connection to the authentication service failed. " 
-                       + ce.getMessage();
+      message = "Connection to the authentication service failed in " +
+                "AuthSession.authenticate: " + ce.getMessage();
     } catch ( IllegalStateException ise ) {
       message = ise.getMessage();
     }
Index: src/edu/ucsb/nceas/metacat/QuerySpecification.java
===================================================================
--- src/edu/ucsb/nceas/metacat/QuerySpecification.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/QuerySpecification.java	(revision 675)
@@ -98,7 +98,8 @@
     try {
       parser.parse(new InputSource(queryspec));
     } catch (SAXException e) {
-      System.err.println("error parsing data");
+      System.err.println("error parsing data in " + 
+                         "QuerySpecification.QuerySpecification");
       System.err.println(e.getMessage());
     }
   }
@@ -185,7 +186,8 @@
       parser.setErrorHandler(this);
 
     } catch (Exception e) {
-       System.err.println(e.toString());
+       System.err.println("Error in QuerySpcecification.initializeParser " + 
+                           e.toString());
     }
 
     return parser;
Index: src/edu/ucsb/nceas/metacat/MetacatReplication.java
===================================================================
--- src/edu/ucsb/nceas/metacat/MetacatReplication.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/MetacatReplication.java	(revision 675)
@@ -268,7 +268,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in handleServerControlRequest " + 
+      System.out.println("error in " + 
+                         "MetacatReplication.handleServerControlRequest " + 
                          e.getMessage());
       e.printStackTrace(System.out);
     }
@@ -394,7 +395,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error requesting file lock: " + e.getMessage());
+      System.out.println("error requesting file lock from MetacatReplication." +
+                         "handleGetLockRequest: " + e.getMessage());
       e.printStackTrace(System.out);
     }
   }
@@ -430,8 +432,9 @@
     }
     catch (Exception e)
     {
-      System.out.println("error in metacatReplication.handlegetdocumentinforequest: " + 
-      e.getMessage());
+      System.out.println("error in " +
+                         "metacatReplication.handlegetdocumentinforequest: " + 
+                          e.getMessage());
     }
     
   }
@@ -456,7 +459,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error getting document: " + e.getMessage());
+      System.out.println("error getting document from MetacatReplication." +
+                         "handlGetDocumentRequest " + e.getMessage());
     }
     
   }
@@ -562,7 +566,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in handleupdaterequest2: " + e.getMessage());
+      System.out.println("error in MetacatReplication.handleupdaterequest: " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
     
@@ -634,7 +639,8 @@
       }
       catch(Exception ee)
       {}
-      System.out.println("error in handleGetCatalogRequest: " + e.getMessage());
+      System.out.println("error in MetacatReplication.handleGetCatalogRequest:"+ 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
     return null;
@@ -682,7 +688,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in file lock thread: " + e.getMessage());
+      System.out.println("error in file lock thread from MetacatReplication." + 
+                         "run: " + e.getMessage());
     }
   }
   
@@ -815,7 +822,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error writing to replication log");
+      System.out.println("error writing to replication log from " +
+                         "MetacatReplication.replLog: " + e.getMessage());
       //e.printStackTrace(System.out);
     }
   }
@@ -856,7 +864,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in replToServer: " + e.getMessage());
+      System.out.println("error in MetacatReplication.replToServer: " + 
+                         e.getMessage());
     }
     finally
     {
Index: src/edu/ucsb/nceas/metacat/DBQuery.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBQuery.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DBQuery.java	(revision 675)
@@ -105,7 +105,7 @@
           System.out.println(result);
 
         } catch (Exception e) {
-          System.err.println("EXCEPTION HANDLING REQUIRED");
+          System.err.println("Error in DBQuery.main");
           System.err.println(e.getMessage());
           e.printStackTrace(System.err);
         }
@@ -237,7 +237,8 @@
               }
               catch(Exception e)
               {
-                System.out.println("Error getting document: " + e.getMessage());
+                System.out.println("Error getting document in " + 
+                                   "DBQuery.findDocuments: " + e.getMessage());
               }
               
               docid   = xmldoc.getDocID();
@@ -393,10 +394,10 @@
         System.err.println("SQL Error in DBQuery.findDocuments: " + 
                            e.getMessage());
       } catch (IOException ioe) {
-        System.err.println("Error printing qspec:");
+        System.err.println("IO error in DBQuery.findDocuments:");
         System.err.println(ioe.getMessage());
       } catch (Exception ee) {
-        System.out.println("error in DBQuery.findDocuments: " + 
+        System.out.println("Exception in DBQuery.findDocuments: " + 
                            ee.getMessage());
       }
       finally {
@@ -449,7 +450,7 @@
     } 
     catch (SQLException e) 
     {
-      System.err.println("Error getting id: " + e.getMessage());
+      System.err.println("Error in DBQuery.getNodeContent: " + e.getMessage());
     } finally {
       try
       {
Index: src/edu/ucsb/nceas/metacat/DBTransform.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBTransform.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DBTransform.java	(revision 675)
@@ -84,7 +84,8 @@
         dp.parse((Reader)(new StringReader(doc)));
         new XSLProcessor().processXSL(style, dp.getDocument(), pw);
       } catch (Exception e) {
-        pw.println(xsl_system_id + "Error transforming document:\n" + 
+        pw.println(xsl_system_id + "Error transforming document in " +
+                   "DBTransform.transformXMLDocument: " +
                    e.getMessage());
       }
     } else {
@@ -127,22 +128,28 @@
             try {
               the_system_id = rs.getString(1);
             } catch (SQLException e) {
-              System.out.println("Error with getString: " + e.getMessage());                }
+              System.out.println("Error with getString in " + 
+                                 "DBTransform.getSystemId: " + e.getMessage());                
+            }
           } else {
             the_system_id = null; 
           }
         } catch (SQLException e) {
-          System.err.println("Error with next: " + e.getMessage());
+          System.err.println("Error with next in DBTransform.getSystemId: " + 
+                              e.getMessage());
           return ("Error with next: " + e.getMessage());
         }
       } catch (SQLException e) {
-        System.err.println("Error with getrset: " + e.getMessage());
+        System.err.println("Error with getrset in DBTransform.getSystemId: " + 
+                            e.getMessage());
         return ("Error with getrset: " + e.getMessage());
       }
       pstmt.close();
     } catch (SQLException e) {
-      System.err.println("Error getting id: " + e.getMessage());
-      return ("Error getting id: " + e.getMessage());
+      System.err.println("Error getting id in DBTransform.getSystemId: " + 
+                          e.getMessage());
+      return ("Error getting id in DBTransform.getSystemId:: " + 
+               e.getMessage());
     }
     return the_system_id;
   }
Index: src/edu/ucsb/nceas/metacat/MetaCatServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/MetaCatServlet.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/MetaCatServlet.java	(revision 675)
@@ -195,7 +195,8 @@
         // Open a pool of db connections
         connectionPool = util.getConnectionPool();
       } catch (Exception e) {
-        System.err.println("Error creating pool of database connections");
+        System.err.println("Error creating pool of database connections in " +
+                            " MetaCatServlet.handleGetOrPost");
         System.err.println(e.getMessage());
       }
     }    
@@ -303,9 +304,11 @@
       try {
         handleReadAction(/*out,*/ params, response, username);
       } catch (ClassNotFoundException e) {
-        System.out.println(e.getMessage());
+        System.out.println("Error in MetacatServlet.handlGetOrPost: " + 
+                            e.getMessage());
       } catch (SQLException se) {
-        System.out.println(se.getMessage());
+        System.out.println("Error in MetaCatServlet.handleGetOrPost: " + 
+                            se.getMessage());
       }
     } 
 /*
@@ -344,7 +347,8 @@
       }
       catch(Exception e)
       {
-        out.println("error viewing abstract: " + e.getMessage());
+        out.println("error viewing abstract from " + 
+                    "MetacatServlet.handleGetorPost: " + e.getMessage());
       }
     } else if (action.equals("getdatadoc")) {
       response.setContentType("application/zip");
@@ -402,6 +406,7 @@
         out.println("</body>");
         out.close();
       } catch (MalformedURLException mue) {
+        System.out.println("bad url from MetacatServlet.handleGetOrPost");
         out.println(mue.getMessage());
         mue.printStackTrace(out);
         out.close();
@@ -488,7 +493,8 @@
     }
 	  catch (Exception e) 
     {
-      System.out.println("error in handleGetDataPortAction: " + e.getMessage());
+      System.out.println("error in MetacatServlet.handleGetDataPortAction: " + 
+                          e.getMessage());
     }
   }
 
@@ -508,6 +514,8 @@
     try {
       sess = new AuthSession();
     } catch (Exception e) {
+      System.out.println("error in MetacatServlet.handleLoginAction: " +
+                          e.getMessage());
       out.println(e.getMessage());
       return;
     }
@@ -735,7 +743,7 @@
     catch (Exception e) 
     {
       util.returnConnection(conn); 
-      util.debugMessage("Error in runQuery: " + e.getMessage());
+      util.debugMessage("Error in MetacatServlet.runQuery: " + e.getMessage());
       doclist = null;
       return doclist;
     }    
@@ -847,15 +855,23 @@
     }
     catch (IOException ioe)
     {
-       util.debugMessage("error in handlegetabstract: " + ioe.getMessage());
+       util.debugMessage("error in MetacatServlet.handlegetabstract: " + 
+                          ioe.getMessage());
+       System.out.println("IO error in MetacatServlet.handlegetabstract: " + 
+                          ioe.getMessage());
     }
     catch(SQLException sqle)
     {
-      util.debugMessage("error in handlegetabstract: " + sqle.getMessage()); 
+      util.debugMessage("sql error in MetacatServLet.handlegetabstract: " + 
+                         sqle.getMessage());
+      System.out.println("sql error in MetacatServLet.handlegetabstract: " + 
+                         sqle.getMessage());
     }
     catch(Exception e)
     {
       util.debugMessage("error in handlegetabstract: " + e.getMessage());
+      System.out.println("error in MetacatServlEt.handlegetabstract: " + 
+                         e.getMessage());
     }
     
     util.returnConnection(conn);
@@ -936,7 +952,9 @@
             }
             catch(Exception e)
             {
-              util.debugMessage("error viewing html document"); 
+              System.out.println("error viewing html document from " +
+                            "MetacatServlet.handleGetRelatedDocumentAction: " +
+                            e.getMessage()); 
             }
           }
         }
@@ -976,7 +994,6 @@
         handleGetRelatedDocumentAction(out, params, response, murl);
       }
     } catch (MalformedURLException mue) {
-      System.out.println("in catch");
       out = response.getWriter();
       handleGetDocumentAction(out, params, response);
     }
@@ -1056,7 +1073,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in handleGetData: " + e.getMessage());
+      System.out.println("error in MetacatServlet.handleGetData: " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
   }
@@ -1416,7 +1434,8 @@
           }
           catch(Exception e)
           {
-            util.debugMessage("error downloading html document"); 
+            System.out.println("error downloading html document "+ 
+                               "in metacatServlet.handleGetDataDocumentAction"); 
           }
         }
       }
@@ -1427,7 +1446,9 @@
   }
   catch(Exception e)
   {
-    System.out.println("Error creating zip file: " + e.getMessage()); 
+    System.out.println("Error creating zip file from " +
+                       "MetacatServlet.handleGetDataDocumentAction: " + 
+                        e.getMessage()); 
     e.printStackTrace(System.out);
   }
            
Index: src/edu/ucsb/nceas/metacat/DBSAXHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBSAXHandler.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DBSAXHandler.java	(revision 675)
@@ -181,7 +181,8 @@
                                        docname, doctype, docid, action, user, 
                                        this.serverCode);
        } catch (Exception ane) {
-         throw (new SAXException("Error with " + action, ane));
+         throw (new SAXException("Error in DBSaxHandler.startElement " + 
+                                 action, ane));
        }
        // not needed any more
        //rootNode.writeDocID(currentDocument.getDocID());
@@ -251,7 +252,8 @@
             dbconn.rollback();
             dbconn.close();
           } catch (SQLException sqle) {}
-          System.out.println("Error writing ACL. " + e.getMessage()); 
+          System.out.println("Error writing ACL in DBSaxHandler.run " + 
+                             e.getMessage()); 
         }
       }
       
@@ -263,7 +265,8 @@
         dbconn.rollback();
         dbconn.close();
       } catch (SQLException sqle) {}
-      System.out.println("Error writing XML Index. " + e.getMessage()); 
+      System.out.println("Error writing XML Index in DBSaxHandler.run " + 
+                         e.getMessage()); 
     }      
   }
 
Index: src/edu/ucsb/nceas/metacat/DataFileUploadInterface.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DataFileUploadInterface.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DataFileUploadInterface.java	(revision 675)
@@ -84,6 +84,7 @@
     }
     catch(UnknownHostException u)
     {
+      System.out.println("unknown host in DataFileUploadInterface.getSocket");
     }
     catch(IOException i)
     {
@@ -111,7 +112,8 @@
     }
     catch(UnknownHostException u)
     {
-      //it better know localhost!
+      System.out.println("unknow host error in " + 
+                         "DataFileUploadInterface.portIsAvailable");
     }
     catch(IOException i)
     {
Index: src/edu/ucsb/nceas/metacat/DataFileServer.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DataFileServer.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DataFileServer.java	(revision 675)
@@ -178,7 +178,7 @@
         }
         catch(Exception ee)
         {
-          System.out.println("error: " + ee.getMessage());
+          System.out.println("error DataFileServer.run(): " + ee.getMessage());
         }
         e.printStackTrace(System.out);
       }
@@ -186,7 +186,8 @@
     catch(InterruptedIOException iioe)
     {
       //the accept timeout passed
-      //System.out.println("socket on port " + port + " timed out.");
+      System.out.println("socket on port " + port + " timed out. " +
+                         " (DataFileServer.run)");
     }
     catch (IOException ex) 
     {
@@ -200,7 +201,7 @@
       }
       catch(Exception ee)
       {
-        System.out.println("error: " + ee.getMessage());
+        System.out.println("error in DataFileServer.run(): " + ee.getMessage());
       }
     } 
     finally 
Index: src/edu/ucsb/nceas/metacat/DocumentImpl.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DocumentImpl.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DocumentImpl.java	(revision 675)
@@ -111,7 +111,8 @@
     } catch (McdbException ex) {
       throw ex;
     } catch (Throwable t) {
-      throw new McdbException("Error reading document " + docid + ".");
+      throw new McdbException("Error reading document from " +
+                              "DocumentImpl.DocumentImpl: " + docid);
     }
   }
 
@@ -473,7 +474,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in getDocumentInfo: " + e.getMessage());
+      System.out.println("error in DocumentImpl.getDocumentInfo: " + 
+                          e.getMessage());
     }
     
     //deal with the key words here.
@@ -514,7 +516,6 @@
         //this.publicaccess   = rs.getInt(10);
         this.rev            = rs.getInt(10);
       } 
-      pstmt.close();
 
       if (this.doctype != null) {
         pstmt =
@@ -530,12 +531,14 @@
         if (tableHasRows) {
           this.system_id  = rs.getString(1);
         } 
-        pstmt.close();
+        //pstmt.close();
       }
     } catch (SQLException e) {
-      System.out.println("error in getDocumentInfo: " + e.getMessage());
+      System.out.println("error in DocumentImpl.getDocumentInfo: " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
-      throw new McdbException("Error accessing database connection.", e);
+      throw new McdbException("Error accessing database connection in " +
+                              "DocumentImpl.getDocumentInfo: ", e);
     }
 
     if (this.docname == null) {
@@ -595,7 +598,8 @@
       pstmt.close();
 
     } catch (SQLException e) {
-      throw new McdbException("Error accessing database connection.", e);
+      throw new McdbException("Error accessing database connection from " +
+                              "DocumentImpl.getNodeRecordList ", e);
     }
 
     if (nodeRecordList != null) {
@@ -651,7 +655,7 @@
         pstmt = conn.prepareStatement(
                 "DELETE FROM xml_index WHERE docid='" + this.docid + "'");
         pstmt.execute();
-        pstmt.close();
+        //pstmt.close();
 
         // Update the new document to reflect the new node tree
         pstmt = conn.prepareStatement(
@@ -713,7 +717,7 @@
       pstmt.execute();
       pstmt.close();
     } catch (SQLException e) {
-      System.out.println(e.getMessage());
+      System.out.println("Error in DocumentImpl.setTitle: " + e.getMessage());
     }
   }
 
Index: src/edu/ucsb/nceas/metacat/AuthMcat.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthMcat.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/AuthMcat.java	(revision 675)
@@ -74,7 +74,7 @@
       String name = "//" + srbHost + "/SrbJavaGlue";
       srbJG = (SrbJavaGlueInterface)Naming.lookup(name);
     } catch (Exception e) {
-      System.err.println("AuthMcat static: " + e.getMessage());
+      System.err.println("error in AuthMcat static: " + e.getMessage());
     }    
   }    
 
@@ -100,7 +100,8 @@
         }
 
       } catch ( RemoteException re) {
-        throw new ConnectException(re.getMessage());
+        throw new ConnectException("Error in AuthMcat.authenticate: " + 
+                                   re.getMessage());
       }
       
       return false;
@@ -125,7 +126,8 @@
         }
 
       } catch ( RemoteException re) {
-        throw new ConnectException(re.getMessage());
+        throw new ConnectException("Error in AuthMcat.getUsers " + 
+                                   re.getMessage());
       }
       
       return null;
@@ -149,7 +151,8 @@
         }
 
       } catch ( RemoteException re) {
-        throw new ConnectException(re.getMessage());
+        throw new ConnectException("Error in AuthMcat.getUsers: " + 
+                                    re.getMessage());
       }
       
       return null;
@@ -173,7 +176,8 @@
         }
  
       } catch ( RemoteException re) {
-        throw new ConnectException(re.getMessage());
+        throw new ConnectException("Error in authMcat.getGroups: " + 
+                                   re.getMessage());
       }
       
       return null;
@@ -197,7 +201,8 @@
         }
 
       } catch ( RemoteException re) {
-        throw new ConnectException(re.getMessage());
+        throw new ConnectException("Error in AuthMcat.getGroupds: " + 
+                                    re.getMessage());
       }
       
       return null;
Index: src/edu/ucsb/nceas/metacat/ReplicationHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/ReplicationHandler.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/ReplicationHandler.java	(revision 675)
@@ -140,8 +140,10 @@
         responses.add(result);
       }
       
-      //System.out.println("responses: " + responses.toString());
+      //String srvr = util.getOption("servletpath");
       
+      //System.out.println("responses (from srvr): " + responses.toString());
+      
       for(int i=0; i<responses.size(); i++)
       { //check each server for updated files
         //System.out.println("parsing responses");
@@ -224,7 +226,9 @@
             }
             catch(Exception e)
             {
-              System.out.println("error writing document " + docid);
+              System.out.println("error writing document in " + 
+                                 "ReplicationHandler.update: " + docid +
+                                 ": " + e.getMessage());
             }
           }
         }
@@ -264,7 +268,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in update2: " + e.getMessage());
+      System.out.println("error in ReplicationHandler.update: " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
     finally
@@ -282,7 +287,6 @@
    */
   private void updateCatalog(Hashtable serverList, Connection conn)
   {
-    System.out.println("in updateCatalog");
     try
     {
       String server;
@@ -351,7 +355,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in updateCatalog: " + e.getMessage());
+      System.out.println("error in ReplicationHandler.updateCatalog: " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
   }
@@ -419,7 +424,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in alreadyDeleted: " + e.getMessage());
+      System.out.println("error in ReplicationHandler.alreadyDeleted: " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
     finally
Index: src/edu/ucsb/nceas/metacat/DBSAXNode.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBSAXNode.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DBSAXNode.java	(revision 675)
@@ -143,6 +143,7 @@
       }
 
     } catch (SQLException e) {
+      System.out.println("Error in DBSaxNode.writeChildNodeToDB");
       System.err.println("Error inserting node: (" + nodetype + ", " +
                                                      nodename + ", " + 
                                                      data + ")" );
@@ -169,7 +170,8 @@
         pstmt.execute();
         pstmt.close();
       } catch (SQLException e) {
-        System.out.println(e.getMessage());
+        System.out.println("Error in DBSaxNode.writeNodeName: " + 
+                           e.getMessage());
         throw new SAXException(e.getMessage());
       }
   }
@@ -188,7 +190,8 @@
         }
         stmt.close();
       } catch (SQLException e) {
-        System.out.println("Error getting id: " + e.getMessage());
+        System.out.println("Error in DBSaxNode.generateNodeID: " + 
+                            e.getMessage());
         throw new SAXException(e.getMessage());
       }
 
@@ -281,7 +284,8 @@
       // Close the database statement
       pstmt.close();
     } catch (SQLException sqe) {
-      System.err.println("SQL Exception while inserting path to index.");
+      System.err.println("SQL Exception while inserting path to index in " + 
+                         "DBSAXNode.updateNodeIndex");
       System.err.println(sqe.getMessage());
       throw new SAXException(sqe.getMessage());
     }
@@ -358,7 +362,8 @@
       // Close the database statement
       pstmt.close();
     } catch (SQLException sqe) {
-      System.err.println("SQL Exception while inserting path to index.");
+      System.err.println("SQL Exception while inserting path to index in " +
+                         "DBSAXNode.updateNodeIndex");
       System.err.println(sqe.getMessage());
       throw new SAXException(sqe.getMessage());
     }
Index: src/edu/ucsb/nceas/metacat/RelationHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/RelationHandler.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/RelationHandler.java	(revision 675)
@@ -47,7 +47,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error opening connection in relationHandler");
+      System.out.println("error opening connection in " + 
+                         "relationHandler.relationHandler: " + e.getMessage());
     }
     
     this.xmldoc = xmldoc;
@@ -226,8 +227,8 @@
         conn.rollback();
       } 
       catch (SQLException sqle) {}
-      System.out.println("Error in relationHandler: " + e.getMessage());
-      util.debugMessage("Error in relationHandler: " + e.getMessage());
+      System.out.println("Error in relationHandler.run: " + e.getMessage());
+      util.debugMessage("Error in relationHandler.run: " + e.getMessage());
       e.printStackTrace(System.out);
       btThread = null;
     }
@@ -253,7 +254,8 @@
         conn.rollback();
       } 
       catch (SQLException sqle) {}
-      System.out.println("error in deleteRelations(): " + e.getMessage());
+      System.out.println("error in RelationHandler.deleteRelations(): " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
     
Index: src/edu/ucsb/nceas/metacat/DocumentIdentifier.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DocumentIdentifier.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DocumentIdentifier.java	(revision 675)
@@ -131,7 +131,8 @@
       }
       catch(Exception e2)
       {}
-      System.out.println("error in DocumentIdentifier.getNewestRev " + 
+      System.out.println("error closing db connection in " + 
+                         "DocumentIdentifier.getNewestRev " + 
                           e.getMessage());
     }
     return "1";
Index: src/edu/ucsb/nceas/metacat/DBUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBUtil.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DBUtil.java	(revision 675)
@@ -81,7 +81,7 @@
           }  
 
         } catch (Exception e) {
-          System.err.println("EXCEPTION HANDLING REQUIRED");
+          System.err.println("error in DBUtil.main");
           System.err.println(e.getMessage());
           e.printStackTrace(System.err);
         }
Index: src/edu/ucsb/nceas/metacat/DataStreamTest.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DataStreamTest.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DataStreamTest.java	(revision 675)
@@ -73,15 +73,16 @@
     } 
     catch (UnknownHostException e) 
     {
-      System.err.println("Don't know about host: " + host);
-      System.out.println("error: " + e.getMessage());
+      System.err.println("Don't know about host: " + host + 
+                         " : error in DataStreamTest.sendFile: " + 
+                         e.getMessage());
       e.printStackTrace(System.out);
       System.exit(1);
     } 
     catch (IOException e) 
     {
-      System.err.println("Couldn't get I/O for "
-                         + "the connection to: " + host);
+      System.err.println("IO error in DataStreamTest.sendFile: "
+                         + "broken connection to: " + host);
       System.out.println("error: " + e.getMessage());
       e.printStackTrace(System.out);
       System.exit(1);
@@ -148,7 +149,7 @@
 	  }
 	  catch (Exception w) 
     {
-      System.out.println("error in DataStreamTest: " + w.getMessage());
+      System.out.println("error in DataStreamTest.sendFile: " + w.getMessage());
     }
    
     try
@@ -173,7 +174,7 @@
     }
     catch(Exception e)
     {
-      System.out.println("error: " + e.getMessage());
+      System.out.println("error in DataStreamTest.sendFile: " + e.getMessage());
     }
 	  return retmsg;
 	}
Index: src/edu/ucsb/nceas/metacat/DBSimpleQuery.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBSimpleQuery.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/DBSimpleQuery.java	(revision 675)
@@ -100,7 +100,7 @@
           System.out.println(result);
 
         } catch (Exception e) {
-          System.err.println("EXCEPTION HANDLING REQUIRED");
+          System.err.println("Error in DBSimpleQuery.main");
           System.err.println(e.getMessage());
           e.printStackTrace(System.err);
         }
@@ -207,7 +207,8 @@
         }
         pstmt.close();
       } catch (SQLException e) {
-        System.out.println("Error getting id: " + e.getMessage());
+        System.out.println("Error in DBSimpleQuery.findDocuments: " + 
+                            e.getMessage());
       }
 
     return docListResult;
Index: src/edu/ucsb/nceas/metacat/ForceReplicationHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/ForceReplicationHandler.java	(revision 674)
+++ src/edu/ucsb/nceas/metacat/ForceReplicationHandler.java	(revision 675)
@@ -127,7 +127,8 @@
     }
     catch(Exception e)
     {
-      System.out.println("error in ForceReplicationHandler: " + e.getMessage());
+      System.out.println("error in ForceReplicationHandler.run: " + 
+                          e.getMessage());
       e.printStackTrace(System.out);
     }
     MetaCatUtil.debugMessage("exiting ForceReplicationHandler Thread");
