Context checking, more debug code.