Added extra checking in StarRouter scripts