error on end script