Added some debug info to console output.