The AppPool needs to have write and modify permissions for the App_Data folder to write to log file.
It should be possible to achieve template switching using the redirection module where user would be redirected to a certain template based on a number of detection properties. Redirection module is capable of appending strings to the URL. For more information please see: https://51degrees.com/support/docum...g/redirect
Of course the limitation is that only the detection properties such as IsMobile can be used as conditions.
Hope this answers your question. Please let me know if I can be of any further assistance.