add proper exit code