Reduce file using each and times cycles