added options for input and output files
verboose output option added