added code for logging warping and traj-opt costs : bug-fixes