Adds debugging code