Add config file generation code to model.