added logging to doctor