Add conditional logic for branch pre-existing