Use log path in temporary directory

Because the default log path cannot be writable by normal user.