Fixed temp directory concurrency issues