Added some logging for debug