switch to using dthread/dlog