Removed left in print line

Fixed a few other issues:
- added socket import
- added more debug