harness: use new take_all_data() function in _dump_to_file().