Register shutdown event
Merge pull request #1 from jmoren/add_shutdown_event

Register shutdown event