Fix error handling for snippets and plugins. Detect syntax errors.
Improved error handling for modules
Log fatal errors