limit open files when merging