bug fix, write columns to file in genIndex mode.