Fix typo that was hiding all module errors

The client error handling logic has a typo that causes a new error and drops the connection, that's why I got lots of `Client disconnected from the Ninja Platform` errors. The patch should catch any driver write error and print a descriptive message

Print stack trace to log to help module development