Changed your mod file to a try-catch-finally system & added event handler.

I was bored so I did this accept if you want don't if you don't want to I'd recommend you to accept but that's your choice man :)
I'd love to help you more man with anything textures code w/e..
If you want help with anything ever google me & you'll probably find a way to contact me :)