removed the main while loop because if catch an exception cannot know state of pinger...