Added diagnostic info when database connection fails