private @Nullable VirtualFile createAndConfigureBuildScriptFile() {
    if (!isCreatingBuildScriptFile) {
      return null;
    }
    try {
      if (buildScriptFile != null && buildScriptBuilder != null) {
        buildScriptBuilder.addPrefix(StringUtil.trimTrailing(VfsUtilCore.loadText(buildScriptFile)));
        String content = StringUtil.convertLineSeparators(buildScriptBuilder.generate(), lineSeparator(buildScriptFile));
        VfsUtil.saveText(buildScriptFile, content);
        return buildScriptFile;
      }
    }
    catch (IOException e) {
      LOG.warn("Unexpected exception on applying frameworks templates", e);
    }
    return null;
  }
private @Nullable VirtualFile createAndConfigureBuildScriptFile()