changed Task.now to Task.delay in places where side effects are executed for proper exception handling