refactor generate-path
change timings
add file saving, flash command