Modified script so that it creates table for all files in dir