Save on exit, sorted insert