improve logging + getting PID of wrapper