Attempted fix for too many files open