moved error alert out of origin loop,  based check on whether any markup...

... had been generated