Fix exit from function in batch file issue.
Added select node version part to bash script.
Fixed typo issue (missing $).
Added missing error redirect.
Added select node version validation to test.