change names to be a bit more mapreducey
passing in a redundant argument: $log_fh is always in scope.