fix "too many files opened"