fix unexpected exit error

stop throwing exception because it causes unexpected exit