wpi.ps1 updated

Debug function added.

Change-Id: Iad5a131cd361e6a84ac70d9da23b3a7057be8a1b