Added further debugging code