fixing 'TypeError: argument 1 must be string without null bytes, not unicode' in Sublime 2
fixing socket disconnect failing on osx
adding additional error handling