Update base.rb

enhanced debug code