Added some debug messages to PWS