Altered error handling to change the interval time to 5 seconds. It gets reset to an hour every time the onTimedEvent() method is called. if everything finishes properly, it stays an hour.

Added a couple helper methods.