When one of the `Read(Line)` or `Expect` overloads is invoked, the write buffer should first be flushed.