WIP: script and loader error handling