My own PC has now upgraded to Windows 10 Creators edition (v1703) and I get the same problem. I did a fresh install of Windows 10 v1703 in a virtual machine and the above code does work.
When the task fails it just skips on to the next due time and nothing shows in the history.
When the task fails it just skips on to the next due time and nothing shows in the history.