Purge the queue when scaling down apps. Fixes #254

Also improve logging.