Adds code to write version