Added support for logging twig templates with an error

Fixes: #218