It doesn't make sense. You can verify the path on the server by executing
where schtasks to verify the path. The only difference otherwise is you specify one as an .exe and the other you do not, but neither should make a difference.
Are you sure that the second error reporting isn't the first? Did you delete the output file after the first run then try again to verify the same error? You'll want to make sure you're not running cached as well, so just give it a random querystring on the request.
header('HTTP/1.1 420 Enhance Your Calm');