fix server and add log