add better way of checking if process exists