Write qaly_improvement at each iteration so never lose work