polished shutdown section in cmd