creating of codebook file