Suggestions for #4 (returning None) and #2 (logging server responses)

* removed unused "import socket"
* changed broad "except" clause to more specific "except ImportError"
* general PEP8 reformat
* added "debug" option for logging server responses/errors
* return None instead of True/False on several errors that may be temporary