Adding error templates and logging.
Title.