Save profile when reaching the end