Add cursor and connection wrappers for logging.
Print objective function value.
Return result objetive function value.