fix backend stuff to propagate exception up to front end
fix frontend stuff to have right flow and save files internally