Fixed log file bug with Windows 8.1

Now generic for all Windows except XP