private void delete(File... files) throws Exception {
    for (File f: files) {
      if (f.isDirectory())
        delete(f.listFiles());
      if (!f.delete())
        throw new UserInputException("Could not delete: "+f);
    }
  }