improve iterate_filelist, it now calls the callback with a struct filelistinfo