log errors better for setting parameters