sort_and_write_bim debug