fix retval to log comand