Added some try/catch

Signed-off-by: Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com>