updates to logging. updates to template context