catch exceptions but keep retrying