added throttle and better error logging