Fix lazy loading issue with setErrorFile.