Code for building the config file.