fixed bug too many open files