Have you tried making the config file read only after you make the change? Don't know if it otherwise needs to be written to for any reason but it's worth a try.