Modifying HEAD to use exists.