Fixed too many open files error.