Some error handling and also reporting in log if database configuration
is not ok