Generate mapping file