finished writing to the output file