Fix generator, and improve logging to make the break easier to diagnose next time around