add database connection error logging