replace childprocess with Process.spawn