There is no reason to pass self._dumpfile to _write_dumpfile_header().