Putting debug code in utils.rb

Adding logging to see what might be going wrong