Using a txt format of codebook