Add signal handler to clean up if we are killed