added exit status on error.