Added check to save file: file must be selected.