public void debug(boolean DEBUG, String out, FileWriter fw, String message) { try { if (DEBUG)  System.out.println(message);  if (out != null) {  fw = new FileWriter(out, true); fw.write(message+"\n"); fw.close(); } } catch (IOException ie) { ie.printStackTrace(); }  }
public void debug(boolean DEBUG, String message) { if (DEBUG)  System.out.println(message); }
 public void debug(boolean DEBUG, String out, FileWriter fw, String message) {	 try {	     if (DEBUG) //default to stdout		 //System.out.println(formatMessage(message));		 System.out.println(message);	     	     if (out != null)		 {		     //System.out.println("CommonUtilPlugIn:debug -Writing to file " + out);		     fw = new FileWriter(out, true);		     fw.write(message+"\n");		     fw.close();		 }	 } catch (IOException ie) {	     ie.printStackTrace();	 }//catch      }