added exit codes (fail on failure)