add logging before forking child process