improve task execution error handling to include the Exception (if any)
remove commons dependencies by duplicating required functionality (with test cases)