ENG-6428: add debugging info and refactor generation creation.