Fix the shell which writes build version to file