Windows related fixes.
Initial logging support.