added writeDump