troubleshooting template generation