instrumenting closedialogs