Improve exit code reporting