anchor.diff:            begin
               OldEncoding:= Ed.EncodingName;
               Ed.EncodingName:= cEncNameUtf8_NoBom;
  -            DoSave;
  +            SaveSimple(AFileName);
               MsgBox(Format(msgCannotSaveFileWithEnc, [OldEncoding]), MB_OK or MB_ICONWARNING);
             end;
           on E: EFileNotFoundException do
  
positive.code:       ....
      else
      }
        Ed.SaveToFile(AFileName);
    end;
    //
  var
  
negative.code:     Ed.BeginUpdate;
      try
        try
          SaveSimple(AFileName);
          //prevent empty result file, issue #3435
          if (Ed.Strings.Count>0) and (FileUtil.FileSize(AFileName)=0) then
            raise EFileNotFoundException.Create('Saved to an empty file');
  