For the sake of error handling, you should do a check on ``ret_val``. If the command fails (i.e., ``ret_val != 0``), you should raise an error and print ``stdout`` and ``stderr``.