function to genrate the config' text