refactored filelist directive