Add some exception handling