This was a bug in the dump script that I introduced accidentally :-( The mode must be append because this code is inside a for loop, for instance you could have two outputs of kind hazard curve and you want to save both on the same file.