Additional work on the Windows service. Added some windows alternatives and fixed the logging code, which did not compile.