potential fix for when filenames are undefined