Change runIO to use Query and Effect