Document take_diag()
Added a flag to enable thread safe death tests