Fix for "Too many open files"