fix buffer overrun exceptions at end of file
updates to dumping tools