able to specify input file and output file