Added command line parsing for averaging task.