Close output file