Added template for error if not in debug