Added some more try and except to compensate some errors