code: public static RaftConfiguration loadFromFile(String configFile) throws IOException {
          File config = new File(configFile);
  
          if (!config.exists() || !config.canRead()) {
              throw new IOException(String.format("%s cannot be opened", config));
          }
  
          ObjectMapper mapper = new ObjectMapper(); // this method is called rarely, so creating one inline is nbd
          RaftConfiguration configuration = mapper.readValue(config, RaftConfiguration.class);
          return validate(configuration);
      }
docs: Load and validate a {@code RaftAgent} configuration from the specified configuration file.
  <p/>
  See the project README.md for more on the configuration file options and format.
  
  @param configFile absolute path of the libraft-agent configuration file
  @return fully-populated <strong>and</strong> validated {@link RaftConfiguration} instance.
  This instance can be used as an argument to
  {@link io.libraft.agent.RaftAgent#RaftAgent(RaftConfiguration, io.libraft.RaftListener)}.
  
  @throws IOException if {@code configFile} does not exist or cannot be found
  @throws RaftConfigurationException if the configuration specified in {@code configFile} has errors