added log.rb and documented