Add error handling to texture loading