Add some error-handling