now it loops around all files and it save figs and results