minor update to chat.rb
create in and out files for chat.rb