@Override
  protected Result validate(Set<Path> pathsToWatch) {
    Result result = null;
    try {
      SchemaSpecification spec;
      pathsToWatch.add(specPath);
      spec = SchemaSpecification.load(specPath);
      result = validate(profile, spec, config);
    } catch (Exception exception) {
      Throwable rootCause = ExceptionUtils.getRootCause(exception);
      if (hasCause(exception, YamlEngineException.class) || hasCause(exception, JacksonException.class)) {
        output.println(AnsiColors.red("Malformed yaml input:\n\n" + rootCause.toString().indent(4)));
      } else {
        output.println(AnsiColors.red(
          "Unexpected exception thrown:\n" + rootCause.toString().indent(4) + "\n" +
            String.join("\n", ExceptionUtils.getStackTrace(rootCause)))
          .indent(4));
      }
    }
    return result;
  }
Validates that {@code profile} maps input features to expected output features as defined in {@code specPath} and
returns true if successful, false if failed.
planetiler-core/src/main/java/com/onthegomap/planetiler/validator/JavaProfileValidator.java