Nicer error logging when losing connection.