Wrap all scripts in try-catch blocks

Wrap all scripts in try-catch blocks to ensure all properly written JS-files are loaded correctly.