Assigned cmd[1] to returncode for better readability.