Added generation of failure messages as text elements