Add warning for IOErrors when saving file
Add warning for IOErrors when saving file

* use `with open(...)` for saving data file to disk (to be sure file got
closed)
* display warning to the user if a file couldn't be saved

chokepoint/DET,chokepoint/DET