set new key and add configurable error messages