fix shutdown client crash bug.
adding log window.