Fix the correct branch check

- if there is a \n in the file we will trim that