[REQS-383] Change exportMulticurveProviderDiscount by collecting the argument checkers before opening the writer and removing the wrtier.flush.