added a fprintf to the optimization problem solver