Add extra try-catch block

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>