Better error handling in tutorial