Add proper error message when failing the export