public void ProcessPayments(string inputFile, string outputFile) { try { //read and do initial validation Payments = PaymentIO.ReadPayments(inputFile); //more validations Payments = PaymentValidator.ValidateAllPayments(Payments); //outpu PaymentIO.WriteCumulativePayments(outputFile, Payments); } catch (Exception e) { Log("Failed to process payments. " + e.Message); } }