catch errors in report templates