Added some automatic filename saving.