add try to the apple script as it somtimes fails