updated "version" extraction in main task

(so versions with extra info in the "version.txt" do not cause errors)