prevent writing the version file if the version has not changed
add a test to ensure the file is not written to when the version does not change