Added some try..catch