Adding test. Verify if database object exists and try to connect again if it doen't.