Updated error message for opened table state check