added more begin/rescue blocks