add an exit and error code