Add signal handler to cleanup