CFY-1674 fix exception catching