add pid logger for the server (but not working properly)