Improved error handling
Improved sample code

Now properly catches db errors on connect