Refactor: 1) use get-filelist as basic module 2) remove temp files