reduce the scope of the try-block to accord with the comment