deal with errexit