some debugging for client and server