we check if the image is valid (see line 38), so checking the output of shell_exec is not necessary (imho)