Add waiting gif, optimize on error