implemented configurable input and output files