code: private void createInitialDirectoryIfNecessary() throws IOException {
      if (!directory.exists()) {
        if (!directory.mkdirs()) {
          throw new WebDriverException("Unable to create directory path: " + directory.getPath());
        }
      }
      if (!widgetsDat.exists()) {
        Files.write(WIDGET_DAT_CONTENT, widgetsDat, Charsets.UTF_8);
      }
    }
docs: Create initial widgets directory and extension configuration file (widgets.dat) if needed.
  
  @throws IOException If