Added ability to take average of a single file