adds a try-catch block in script processing
Merge pull request #29 from matiu/bug/script-processing

adds a try-catch block in script processing