Handling TempDirectory