modify filegenerator
extract method for getfilelist