Fixes error: Too many open files