Added some logging calls