tool: Add logging to memdump