Adding some debugging code