Added a bunch of debug output