remove unnecessary code
add progress message
fix bug that containing newline in branch name