Forgot to say: if you wish just to save your config you have to enable the "save config on exit" option in retroarch menu. Can't remember where it is located, but it should be easy to find it.