chore(release): Improved version control in release script as well as error handling.