Perhaps show all the output? Perhaps just show N lines before/after the specified index... Also perhaps add the numerical index when printing all the output?