terminate script if offline event received