Wrap template rendering exception

Wrap possible exception during template rendering. This is intend to add more descriptive message for issue #4.