Fix "Exceptions"

- Fixed "Exceptions" that stopped the script
- Added function `enableLogException`