Added some more logging
Merge Suraj's changes