when executing task in the background with Function.execute() then run then and onError also on background instead of calling thread