Added debugging output to the console window.