catch all exceptions that occur during receive and connection made in secureAgent as well