You should check if the command has been successful before reading the output