Script now handle exceptions.