Optimise config file