Added calls to exit after every header(Locate:...) call