Added some more logging statements to support debugging