handle SIGTERM as well