if save/delete on file throws an error the promise is rejected with that error