Use buffer contents in failure messages if non-empty