diff --git a/tag.go b/tag.go
index <HASH>..<HASH> 100644
--- a/tag.go
+++ b/tag.go
@@ -284,14 +284,14 @@ func (t *Tag) Save() error {
 	newFile.Close()
 	originalFile.Close()
 
-	// Make sure we clean up the temp file if it's still around
-	os.Remove(newFile.Name())
-
 	// Replace original file with new file
 	if err = os.Rename(newFile.Name(), originalFile.Name()); err != nil {
 		return err
 	}
 
+	// Make sure we clean up the temp file if it's still around
+	os.Remove(newFile.Name())
+
 	// Set t.file to new file with original name
 	t.file, err = os.Open(originalFile.Name())
 	if err != nil {
Fix bug with rename in tag.Save