Add function to save transcript of conversation in Online mode;

fix NullPointerException at MainFrame.closeTab(MainFrame.java:220)