Close outputFile when exit.