Add a debug function to print the register contents