add a break when error occurs