make sure config is written before service is started