Add loading indicator and error checking