added additional check for saving with a blank profile name