update settings and update output file after each run