add exception catcher