error check getting branch name