Simplify the loading notice and add flash message for errorD