fixing the xdmf writing