Changing codebook to txt