added exception logging to Tasks.