Fixed tests
Attempt to fix 'too many open files' problem