only print output from mongo if pid is available