improved error handling when creating and removing queues