move write_config_spec function to other project