Added some logging for debug purposes