only write version to file if downloaded successfully