add ranking tools & fix count_log_files.rb