Adding appropriate error handling of broken templates.