closed open files in script