Added dumping utility

* `names` now defined properly
* Files are being closed