Nope, the \taskname is just fine, in fact it's required (it's the path).
You're having the same issue I was having until I re-read the docs
If you use the TaskEventLog constructor which specifies a remote machine, you will need to use impersonation to logon to an account with privileges to the remote machine before instantiating the TaskEventLog.
So, Change your ActOnTask from this
TaskEventLog log = new TaskEventLog(t.Path);
To This:
TaskEventLog log = new TaskEventLog("server", t.Path, "Domain", "UserName", "Password");
And you should be good to go.