Added debug statements to context template