public static void main(String[] args) {

        CommandLineParser parser = new DefaultParser();
        Options options = new Options();
        final Logger logger = LoggerFactory.getLogger(Application.class);
        logger.info("Application for generating web-pages");

        options.addOption("m", "metrics", false, "Activate metrics");
        options.addOption("p", "properties", true, "Enable your properties");
        options.addOption(Option.builder("f")
                .numberOfArgs(2)
                .argName("in-folder out-folder")
                .required()
                .desc("required two folders")
                .build());
        options.addOption("d", "dry run", false, "Enable dry run");

        try {
            CommandLine commandLine = parser.parse(options, args);

            if (commandLine.hasOption("f")) {

                final File inFolder = new File(commandLine.getOptionValues("f")[0]);
                final File outFolder = new File(commandLine.getOptionValues("f")[1]);

                if (!inFolder.isDirectory()) {
                    logger.error("Input folder does not exist: "
                            + inFolder.getAbsolutePath());
                    System.exit(1);
                }

                if (!outFolder.isDirectory()) {
                    logger.error("Output folder does not exist: "
                            + outFolder.getAbsolutePath());
                    System.exit(1);
                }

                try {
                    String settingsName;
                    if (commandLine.hasOption("p")) {
                        settingsName = commandLine.getOptionValue("p");
                    } else {
                        settingsName = MAIN_PROPERTIES;
                    }
                    boolean dryRun = false;
                    if (commandLine.hasOption("d")) {
                        dryRun = true;
                    }
                    FilesystemWalker app = new FilesystemWalker(settingsName, dryRun);
                    if (commandLine.hasOption("m")) {
                        app.activateMetrics();
                    }
                    app.processFolder(inFolder, outFolder.getAbsolutePath(), false);
                } catch (IOException ex) {
                    logger.error("Fail: ", ex);
                }
            }

        } catch (ParseException ex) {
            logger.error("Fail, parse error: ", ex);
            HelpFormatter formatter = new HelpFormatter();
            formatter.printHelp("web-template", options);
        }
    }