@ApiStatus.Internal
  public static void saveActionScript(@NotNull List<ActionCommand> commands, @NotNull Path scriptFile) throws IOException {
    Files.createDirectories(scriptFile.getParent());
    try (ObjectOutput oos = new ObjectOutputStream(Files.newOutputStream(scriptFile))) {
      oos.writeObject(commands.toArray(new ActionCommand[0]));
    }
    catch (Throwable t) {
      try {
        Files.deleteIfExists(scriptFile);
      }
      catch (IOException e) { t.addSuppressed(e); }
      throw t;
    }
  }
@ApiStatus.Internal
  public static void saveActionScript(@NotNull List<ActionCommand> commands, @NotNull Path scriptFile)