Closes output file.