Added handling for error connecting in Bluetooth connection.