Added functionality for 2 output files