Added code to shut down proxy on shell exit