file encoder and config saver