Use newErrorf instead of fmt.Sprintf and newError