[bug] Add sanity check when saving images
Currently, at least with windows, saving an image may fail without any error message if the path does not exist due to saving in a non-existent folder.
This should either require that the path is created (creating folder, not sure it is easy within c++), or at least throw an error and log it. But it seems that there is no check to ensure that the destination file can be/has been created when saving an image.