if (m_tempUndoFiles[m_tempUndoIndex] != null) {  m_tempUndoFiles[m_tempUndoIndex].delete();
m_UndoBut.setEnabled(true);
  public void addUndoPoint() throws Exception {    // create temporary file    File tempFile = File.createTempFile("weka", null);    tempFile.deleteOnExit();    ObjectOutputStream oos =       new ObjectOutputStream(      new BufferedOutputStream(      new FileOutputStream(tempFile)));        oos.writeObject(m_Instances);    oos.flush();    oos.close();    // update undo file list    if (m_tempUndoFiles[m_tempUndoIndex] != null) {      // remove undo points that are too old      m_tempUndoFiles[m_tempUndoIndex].delete();    }    m_tempUndoFiles[m_tempUndoIndex] = tempFile;    if (++m_tempUndoIndex >= m_tempUndoFiles.length) {      // wrap pointer around      m_tempUndoIndex = 0;    }    m_UndoBut.setEnabled(true);  }