Added some connection error handling
Merge pull request #8 from bfred-it/patch-1

Added some connection error handling