Made the main poll loop ignore errors for now, added more resilient checking.