private void init() {
        inputDir = Paths.get(input);
        outputFile = Paths.get(output);
        configFile = Paths.get(config);
        contentDir = Paths.get(content);
        tmpDir = Paths.get(tmp);

        if (!Files.isDirectory(inputDir)) {
            throw new RuntimeException("Input directory \"" + FileUtil.getCanonicalPath(inputDir) +
                    "\" cannot be found!");
        }
        if (!Files.isDirectory(outputFile.getParent())) {
            throw new RuntimeException("Output file \"" + FileUtil.getCanonicalPath(outputFile.getParent())
                    + "\" parent directory cannot be found!");
        }
        if (!Files.isRegularFile(configFile)) {
            throw new RuntimeException("Config file \"" + FileUtil.getCanonicalPath(configFile) +
                    "\" cannot be found!");
        }
        if (!Files.isDirectory(contentDir)) {
            throw new RuntimeException("Content dir \"" + FileUtil.getCanonicalPath(contentDir) +
                    "\" cannot be found!");
        }

        // Make sure tmp dir exists and is empty.
        FileUtil.mkdirs(tmpDir);
        FileUtil.deleteFile(outputFile);
        FileUtil.deleteContents(tmpDir);
    }
Command line tool to process some files from a proxy stroom.
stroom-headless/src/main/java/stroom/headless/Headless.java