Understanding and Mitigating Errors of LLM-Generated RTL Code