improved error displaying if database connection problems