close output file