get_files() updated to check each file has a name, thanks jlejeune