Added try/catch stuff