added catch block.