code: func (s *StatusReport) SaveToFile(ctx context.Context, l *memlogger.MemLogger, path string) error {
  	report := s.Report()
  
  	buf := bytes.Buffer{}
  	l.Dump(&buf)
  	report.LogDump = buf.String()
  
  	blob, err := json.MarshalIndent(report, "", "  ")
  	if err != nil {
  		return err
  	}
  	return AtomicWriteFile(ctx, path, blob, 0644)
  }
docs: // SaveToFile saves the status report and log to a file on disk.