Does this rely on the ``put()`` up above? If so, you'll need to fire this from the ``end()`` statement to avoid race conditions. The calls on ``client`` are async.