update the iocsv function, fix a bug for deleting field that is not existing in database