Added some verbose and debug logging