close the open files in generate/verify