proper exit codes on error