error needs to trigger exit here