fix server selection, add logs to the server