Added loop around shutdown button press