added on error callback to sprite.initWithFile.