Fix tempDir logic
Add default timeouts