private void init() {
        inputDir = getPath(input);
        errorFile = getPath(error);
        configFile = getPath(config);
        contentDir = getPath(content);
        tmpDir = getPath(tmp);

        if (!Files.isDirectory(inputDir)) {
            throw new RuntimeException(
                    "Input directory \"" + FileUtil.getCanonicalPath(inputDir) + "\" cannot be found!");
        }
        if (!Files.isDirectory(errorFile.getParent())) {
            throw new RuntimeException("Output file \"" + FileUtil.getCanonicalPath(errorFile.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(errorFile);
        FileUtil.deleteContents(tmpDir);
    }
Command line tool to process some files from a proxy stroom.
stroom-headless/src/main/java/stroom/headless/Cli.java