use pid for logging