Moved OutputError factory out of the constructor.