Added some debug-level logging