Handle files and has_prefix metadata