to add error checker for gatt connection state