@Override
    protected void launcher() throws IOException, ParseException {
        if (isWeakCompleteness && !isComplete) {
            System.out.println("Unable to use <-w> option without <-c> option");
            return;
        }

        initializeLogger(logFilePath);
        final ScenarioTree tree = loadScenarioTree(arguments, -1);
        saveScenarioTree(tree, treeFilePath);

        PrintWriter modelPrintWriter = null;
        if (modelFilePath != null) {
            try {
                modelPrintWriter = new PrintWriter(new File(modelFilePath));
                logger().info("CSP model file " + modelFilePath);
            } catch (FileNotFoundException e) {
                logger().warning("File " + modelFilePath + " not found: " + e.getMessage());
            }
        }

        if (!solveAll) {
            logger().info("Start building automaton with Choco CSP solver");
            MealyAutomaton resultAutomaton;
            if (modelPrintWriter == null) {
                resultAutomaton = ChocoAutomatonBuilder.build(tree, size, isComplete, isWeakCompleteness);
            } else {
                resultAutomaton =
                        ChocoAutomatonBuilder.build(tree, size, isComplete, isWeakCompleteness, modelPrintWriter);
                modelPrintWriter.close();
            }

            if (resultAutomaton == null) {
                logger().info("Automaton with " + size + " states NOT FOUND!");
            } else {
                logger().info("Automaton with " + size + " states WAS FOUND!");
                saveToFile(resultAutomaton, resultFilePath);
            }
            logger().info("Choco automaton builder execution time: " + executionTime());
        } else {
            logger().info("Start building all feasible automatons with Choco CSP solver");
            final List<MealyAutomaton> result =
                    ChocoAutomatonBuilder.buildAll(tree, size, isComplete, isWeakCompleteness, modelPrintWriter);
            if (modelPrintWriter != null) {
                modelPrintWriter.close();
            }

            logger().info(result.size() + " solutions found");
            for (MealyAutomaton automaton : result) {
                saveToFile(automaton, resultFilePath);
            }
            logger().info("Choco execution time for all solutions: " + executionTime());
        }
    }