fix program error/success reporting