use OutputWriter for output.optim