private void deleteHistoryFiles(@NotNull List<String> historyFileNamesToRemove, @NotNull String reason) {
    Path historyDir = historyFileNamesToRemove.isEmpty() ? null : getCommandHistoryDir();
    if (historyDir == null) {
      return;
    }
    LOG.info("Deleting " + historyFileNamesToRemove + " (" + reason + ")");
    for (String historyFileName : historyFileNamesToRemove) {
      myMap.remove(historyFileName);
      Path file = historyDir.resolve(historyFileName);
      if (Files.exists(file)) {
        try {
          Files.delete(file);
        }
        catch (IOException e) {
          LOG.warn("Cannot delete " + historyFileName, e);
        }
      }
    }
  }
private void deleteHistoryFiles(@NotNull List<String> historyFileNamesToRemove, @NotNull String reason)