Looks like calling fct_validate_filename() to check the profile name interfered with setting the filename variable from the settings dialog such that the latter has been set to an empty string for some reason. With all variables made local there shouldn't be any interference left.
Looks like calling fct_validate_filename() to check the profile name interfered with setting the filename variable from the settings dialog such that the latter has been set to an empty string for some reason. With all variables made local there shouldn't be any interference left.