use a stack buffer for reads in object and export dump functions. fix a typo in export dump error printing. further cleanups.