Write config file in a more appropriate structure