Initialize redoc only once and fix logged errors.