implemented errorOut option