Update generate.rb
Update reader to sort files