Added error event callback

Hi,

I was in need of tracking the images that failed to load, so added an error event call back.
I think it will be useful for other users.

Thanks