Added exit status handling.