Changed dumpwriter to synchronize file writing to avoid file descriptor issuse on large (>1000 nodes).