Refactor update filelist from database