Improve error handling in ContentBuffer

If there are errors when flushing, carry on, rather than fail.