Check connected before doing anything