added functionality to write the version to the disk