Added extra debugging code