public static void main(String[] args){
        log.info("--Start");

        log.info("Read application config");
        Config config = getConfig();
        //
        ArgumentParser parser = ArgumentParsers.newArgumentParser("rni")
                .description("Process rni load testing");
        Subparsers subparsers = parser.addSubparsers().help("");

        Subparser run = subparsers.addParser("run").help("Run test plan");
        run.addArgument("--test_plan")
                .type(Arguments.fileType().verifyIsFile())
                .required(true)
                .help("Path to the test plan");
        run.addArgument("--set_plan")
                .type(Boolean.class)
                .required(false)
                .setDefault(false)
                .help("If true, test plan .jmx will be edited with parameters set in test plan config");

        Subparser status = subparsers.addParser("status").help("Check test execution status");

        Subparser result = subparsers.addParser("prepare_results").help("Process result .csv files");
        result.addArgument("--clear_trans_samplers")
                .type(Boolean.class)
                .setDefault(true)
                .help("Remove transaction controllers from results");

        Subparser loadosophia = subparsers.addParser("loadosophia").help("Upload results to Loadosophia.org");
        loadosophia.addArgument("--target_file")
                .type(Arguments.fileType().verifyIsFile())
                .required(true)
                .help("Define a file that will be a target file for Loadosophia.org");
        loadosophia.addArgument("--other_files")
                .type(Arguments.fileType().verifyIsFile())
                .required(false)
                .nargs(1)
                .help("Define other files that needs to be uploaded to Loadosophia.org");

        Namespace res = null;
        try {
            res = parser.parseArgs(args);
        } catch (ArgumentParserException e) {
            parser.handleError(e);
            System.exit(1);
        }

        String command = args[0];
        if(command == null){
            log.log(Level.SEVERE, "Missing command");
            System.exit(1);
        } else if(command.equals("run")){
            run(config, res);
        } else if(command.equals("status"))
        {
            //TODO: status method
        } else if(command.equals("prepare_results")){
            prepareResults(config, res);
        } else if (command.equals("loadosophia")){
            uploadResults(config, res);
        }

        //
        log.info("--Exit");
    }