Better timeout error checking, necessary for Gazebo