Added some logging for debugging