Check filenames are not empty before renaming