add test for exit code