shutdown.sh further improved