move the dumping code in its own package