class AntennaComplianceTool {

    public static void main(String[] args) {
        AntennaComplianceToolOptions options = AntennaComplianceToolOptions.parse(args);
        if (options.isShowHelp()) {
            printUsage();
            System.exit(1);
        }

        if (options.isDebugLog()) {
            enableDebugLogging();
        }
        try {
            Path propertiesFile = Paths.get(options.getPropertiesFilePath()).toAbsolutePath();

            if (!propertiesFile.toFile().exists()) {
                LOGGER.error("Cannot find {}", propertiesFile);
                throw new IllegalArgumentException("Cannot find " + propertiesFile);
            }

            LOGGER.info("Starting Compliance Tool with mode '{}'", options.getComplianceMode());

            System.exit(new AntennaComplianceTool().execute(options.getComplianceMode(), options.getParameters(), propertiesFile));
        } catch (Exception e) {
            LOGGER.error("Error:", e);
            System.exit(1);
        }
    }

}