Fix could not export settings if a previous file exists