updateOutputFile method created