Added more robust excpetion handling to catch unexpected errors.
Also added a 1 second sleep in bewteen requests to be kinder on servers.