Improve the error management when saving staged changes