Index: /trunk/gli/src/org/greenstone/gatherer/DebugStream.java
===================================================================
--- /trunk/gli/src/org/greenstone/gatherer/DebugStream.java	(revision 12650)
+++ /trunk/gli/src/org/greenstone/gatherer/DebugStream.java	(revision 12651)
@@ -99,5 +99,5 @@
 
 
-    /** Print a stack trace to the debug stream. */
+    /** Print a stack trace to the debug stream, and always to STDERR. */
     static synchronized public void printStackTrace(Exception exception)
     {
Index: /trunk/gli/src/org/greenstone/gatherer/cdm/MacrosManager.java
===================================================================
--- /trunk/gli/src/org/greenstone/gatherer/cdm/MacrosManager.java	(revision 12650)
+++ /trunk/gli/src/org/greenstone/gatherer/cdm/MacrosManager.java	(revision 12651)
@@ -43,8 +43,10 @@
 import org.greenstone.gatherer.collection.CollectionManager;
 import org.greenstone.gatherer.Configuration;
+import org.greenstone.gatherer.DebugStream;
 import org.greenstone.gatherer.Dictionary;
 import org.greenstone.gatherer.Gatherer;
 import org.greenstone.gatherer.gui.DesignPaneHeader;
 import org.greenstone.gatherer.gui.GLIButton;
+
 
 public class MacrosManager {
@@ -187,6 +189,7 @@
 
 		    br.close();
-		} catch (Exception e) {
-		    System.err.println("MacrosManager Exception: "+e.getMessage());
+		}
+		catch (Exception exception) {
+		    DebugStream.printStackTrace(exception);
 		}
 	    }
@@ -194,13 +197,13 @@
 	
 	private void writeMacroFile() {
-	    File extra_dm = new File(CollectionManager.getCollectionDirectoryPath()+"macros"+File.separator+"extra.dm");
+	    File extra_dm_file = new File(CollectionManager.getCollectionDirectoryPath()+"macros"+File.separator+"extra.dm");
 	    try {
-		if (!extra_dm.exists()) {
-		    File parent_dir = extra_dm.getParentFile();
+		if (!extra_dm_file.exists()) {
+		    File parent_dir = extra_dm_file.getParentFile();
 		    parent_dir.mkdirs();
-		    extra_dm.createNewFile();
+		    extra_dm_file.createNewFile();
 		}
 		
-		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(extra_dm), "UTF-8"));
+		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(extra_dm_file), "UTF-8"));
 		String text = macros_textarea.getText();
 		out.write(text, 0, text.length());
@@ -208,6 +211,7 @@
 		out.flush();
 		out.close();
-	    } catch (Exception e) {
-		System.err.println("MacrosManager Exception: "+e.getMessage());
+	    }
+	    catch (Exception exception) {
+		DebugStream.printStackTrace(exception);
 	    }
 	}
@@ -251,38 +255,35 @@
                       	undo_button.setEnabled(true); 
 		    }   
-		    
-                } catch (Exception e) {
-		    System.err.println("MacrosManager Exception: "+e.getMessage());
+                }
+		catch (Exception exception) {
+		    DebugStream.printStackTrace(exception);
                 }           
 	    }
 	}
     
-       private class RedoListener
-	   implements ActionListener {
+
+	private class RedoListener
+	    implements ActionListener {
 	   
-	   public void actionPerformed(ActionEvent evt) {
-	       try {
-		   if (undo.canRedo()) {
-		       int pos = macros_textarea.getCaretPosition();
-		       undo.redo();
-		       macros_textarea.setCaretPosition(pos+1); 
-		       macros_textarea.grabFocus();
-		   }
-		   if (!undo.canRedo()){
-		       redo_button.setEnabled(false);
-		   }
-		   else{
-		       redo_button.setEnabled(true); 
-		   }                     
-		   
-	       } catch (Exception e) {
-		   System.err.println("MacrosManager Exception: "+e.getMessage());
-	       }
-	   }
-       }
-	
-    }
-    
-    
-	
+	    public void actionPerformed(ActionEvent evt) {
+		try {
+		    if (undo.canRedo()) {
+			int pos = macros_textarea.getCaretPosition();
+			undo.redo();
+			macros_textarea.setCaretPosition(pos+1); 
+			macros_textarea.grabFocus();
+		    }
+		    if (!undo.canRedo()){
+			redo_button.setEnabled(false);
+		    }
+		    else{
+			redo_button.setEnabled(true); 
+		    }
+		}
+		catch (Exception exception) {
+		    DebugStream.printStackTrace(exception);
+		}
+	    }
+	}
+    }
 }
