Added check to see if the gripper is already open before the gripper opening loop