write correct config file