ENH: can dump to a mapping file, thanks @ElDeveloper