aborting the rest of the script if endpoint is lost