added function to build filelist on pageload