Add code to handle GPIO actuated shutdown