Catch errors in script and email them to admin