Added support for three exit status values: 0 - succes, 1 - failure, 2 - incomplete.