Fixed too many open files bug.
Fixed too many open files bug.