code: public Boolean storePropertiesFile(String path) throws IOException
      {
          Properties prop = new Properties();
          OutputStream output = null;
  
          try {
  
              output = new FileOutputStream(path);
              for (String key : configs.keySet()){
                  prop.setProperty(key, configs.get(key));
              }
              prop.store(output, null);
  
              return true;
          } catch (IOException io) {
              return false;
          }
      }
docs: Store Configs in Properties File
  
  @param path relative path to the config file
  @return Boolean whether config file stored or not
  @throws IOException May throw IOException if it cannot open configs file