minor changes in write_cfg option