refactored db connection and failure messages