Make it possible to save new and overwrite existing documents