Added Log function and debugging
Added XenApp generated log file output