Grounding LLMs For Robot Task Planning Using Closed-loop State Feedback