Added begin/rescue block to hide ugly stack traces