Added optional arguments for input/output files.