Use log rather the cout in server.