Modify code of query_rawdata_from_catalog