added check that cg table exists in the database - just a warning