moved error logging into task complete
refactor: passing taskComplete as callback instead of wrapping into anon func