Added debugging code to URLConnect