handle shutdown request