bin/zoneconf: Close the output config files at the right time.