Add debugging code