private static @NotNull FileOutputStream writeOrCreate(@NotNull File file) throws FileNotFoundException {
    try {
      return new FileOutputStream(file);
    }
    catch (FileNotFoundException ignored) {
      FileUtil.createIfDoesntExist(file);
      return new FileOutputStream(file);
    }
  }
private static @NotNull FileOutputStream writeOrCreate(@NotNull File file)