Add dump_end() and add a missing forward declaration.