code: func (l *SingleFileStore) Write(p []byte) (n int, err error) {
  	l.mu.Lock()
  	defer l.mu.Unlock()
  
  	if l.file == nil {
  		if err = l.openNew(); err != nil {
  			return 0, err
  		}
  	}
  
  	l.file.Seek(0, 2)
  	n, err = l.file.Write(p)
  	l.size += int64(n)
  	l.Position += int64(n)
  	l.waitForReading.Broadcast()
  
  	return n, err
  }
docs: // Write implements io.Writer.  If a write would cause the log file to be larger
  // than MaxMegaByte, the file is closed, renamed to include a timestamp of the
  // current time, and a new log file is created using the original log file name.
  // If the length of the write is greater than MaxMegaByte, an error is returned.