adding more debugging messages to fix cross domain issue