updated production.rb to push end of loop at bottom of file from error