add try catch, fixes coverity issues 1229132 and 1229133