Add loader and better error reporting