move environment setup into UIAHost_performTaskWithpath, and autorelease environment