Add some error handling
Another error check