added socket error logging in error event