public void OpenAppendStream(IFileInfo fileInfo)
            {
                AppendStream = FileAppender.CreateAppendStream(fileInfo);

                // the compiler creates a cached delegate for non-capturing lambda expressions,
                // so frequent allocation in the case of LogFileAccessMode.OpenTemporarily can be avoided this way
                EnsurePreambleAsync = async(logFile, cancellationToken) =>
                {
                    if (logFile.AppendStream.Length == 0)
                    {
                        await WriteBytesAsync(logFile, logFile.Encoding.GetPreamble(), cancellationToken).ConfigureAwait(false);
                    }

                    logFile.EnsurePreambleAsync = (lf, ct) => default;
                };
            }
            internal void Open(IFileInfo fileInfo)
            {
                _appendStream = FileAppender.CreateAppendStream(fileInfo);

                ShouldEnsurePreamble = true;
            }