Add some more exception handing