Added branch-exists check for target-branch