import java.io.File;
import java.io.PrintStream;
import java.io.FileNotFoundException;
private void printDebug(String msg){
PrintStream ps = null;
try {
throw new Exception(msg);
} catch(Exception e) {
try {
String filename = "trac.log";
File f = new File(filename);
if(!f.exists()){
f.createNewFile();
}
ps = new PrintStream(new java.io.FileOutputStream(f,true));
e.printStackTrace(ps);
} catch (Exception e1) {
e1.printStackTrace();
}finally{
if(ps != null) ps.close();
}
}
}