handle exit message