added a -w switch to ensure a queue exists
typo