Fix issue #15

Throw an exception if there is a bad connection