Make sure the queue is flushed before quitting after SIGINT.