Added a trap handler to shutdown SPARTA and the shield