Flush multiline buffer on teardown to pass test