Add logging

add logging, exit from FileAverage if incorrect number of arguments