update chat.rb, trying to make logging work