Save state in plugin settings file