dump() fixed (error was: header was already written…).