Edited toy line script to print avgX to file AND screen.