adds a try-catch block in script processing

This add a try-catch block to prevent the sync to stop in case a malformed / unknown script is found.