Take out `Process.kill` logic into separate method