code: private void validate(URI location, Collection<URI> dirs) throws IOException {
      if (dirs != null && !dirs.contains(location)) {
        throwIOException("Error. Location: " + location
            + " is not in the configured list of storage directories: " + dirs);
      }
    }
docs: For sanity checking that the given location was configured.