Added an error message if the render fails.