with open(ndx_file, 'w') as fio:
        for i in ndx:
            fio.write(i + '\n')