updated db connection check