I don't think this is the place for this to be, note that the deferred is passed as a parameter bellow, so it doesn't make sense to put the callback before the actual op.