public void setOutputDir(File outputDir) throws Exception {
    if (outputDir.exists() && !outputDir.isDirectory())
      throw new UserInputException("Not a directory: "+outputDir);
    this.outputDir=outputDir;
    inPlace=outputDir.equals(inputDir);
  }