Added debugging features to server.