Only save config if it has changed