Added a debug() function