Some improvements in exception handling

Changed exception logging, added Task exception handling