add close file in calculateOutputs class