Add option to dump metadata
Add support for only exporting a fixed number of blocks