Problem:
The client:exec_cmd callback was incorrectly referencing to err variable
from the outer scope instead of the cmd_err variable from its on scope.
Could cause problems when err is nil but the cmd_err is not.
Solution:
Changed the reference from err to cmd_err