added echo chking in github,removed extra if brace