added code to generate input file for mapreduce