anchor.diff:  procedure TmFilePublisher.AfterCreate;
   begin
     FFileName := '';
  -  FFileAssigned := false;
  +  FFileStream := nil;
  +  FMaxFileSizeInMb:= 0;
   end;
   
   destructor TmFilePublisher.Destroy;
   begin
  -  if FFileAssigned then
  -    Flush(FLogFile);
  +  if Assigned(FFileStream) then
  +    FFileStream.WriteByte(10);
  +
  +  FreeAndNil(FFileStream);
     inherited;
   end;
   
  
positive.code:   strict private
      FCurrentLevel : TmLogMessageLevel;
      FFileName : TFileName;
      FLogFile: Text;
      FFileAssigned : boolean;
    public
      procedure AfterCreate; override;
      destructor Destroy; override;
  
negative.code: end;
  
  procedure TmFilePublisher.Publish(aContext, aLevel, aMessage: string; aDate: TDateTime);
  var
    s: RawByteString;
    i : integer;
  begin
    if FFileName <> '' then
    begin
      if not Assigned(FFileStream) then
      begin
        if FileExists(FFileName) then
        begin
          (*
          if (FMaxFileSizeInMb > 0) and ((FileUtil.FileSize(FFileName) div 1024) > FMaxFileSizeInMb) then
          begin
            RenameFile(FFileName, FFileName + '.bak');
          end;
          *)
          FFileStream := TFileStream.Create(FFileName, fmOpenWrite);
          FFileStream.Seek(0, soFromEnd);
        end
        else
        begin
          FFileStream := TFileStream.Create(FFileName, fmCreate);
          FFileStream.Write(UTF8BOM[0],3);
        end;
      end;
      s := UTF8Encode(Self.GetFormattedString(aContext, aLevel, aMessage, aDate) + sLineBreak);
      FFileStream.Write(s[1], Length(s));
    end;
  end;
  
  