Define an errorList type and use it to accumulate