try to catch the exit code