refactored fn that creates flist to fix bug [ci skip]