code: public static String getOption(Properties props, String key) throws IOException {
      String val = props.getProperty(key);
      if (val == null) {
        throw new IOException("Undefined property: " + key);
      }
      return val;
    }
docs: Get a mandatory configuration option
  
  @param props property set
  @param key key
  @return value of the configuration
  @throws IOException if there was no match for the key