Check return code so we don't push garbage data into the queue.