docs: private void addPropertiesFromFile(final SystemProperties config, final ServletContext context) {
          String fileLocation = StringUtils.replaceVariables(config.getFile(), new HashMap<String, Object>(), true);
          InputStream inStream = null;
          try {
              inStream = getStreamForLocation(fileLocation, context);
              Properties propsFromFile = new Properties();
              propsFromFile.load(inStream);
              for (String prop : propsFromFile.stringPropertyNames()) {
                  String propertyValue = propsFromFile.getProperty(prop);
                  if (propertyValue != null && (config.isOverrideProperties() || (System.getProperty(prop) == null))) {
                      System.setProperty(prop, propertyValue);
                  }
              }
          } catch (FileNotFoundException e) {
              if (!config.isIgnoreMissingFile()) { 
                  throw new IllegalStateException("Could not find properties file: " + fileLocation, e);
              }
          } catch (IOException e) {
              if (!config.isIgnoreMissingFile()) { 
                  throw new IllegalStateException("Error occurred when reading properties file: " + fileLocation, e);
              }
          } finally {
              if (inStream != null) {
                  try {
                      inStream.close();
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
          }
      }