Update VI to save when flashes occur, minor changes to plotting scripts