now check exit code; fix #1