Added functionality to write hit locations to file for histogramming.