Added try blocks.