Add a function to write a configuration in a string.