Optimize the way settings are read / save on keyfile