added a PRINTDATA variable to lighten logging
additional logging
more detailed logging and toned down logging on sockets