JK: Added some more logging to debug.