Error retrieval + optimization