added support for non-null exit status (1 on most errors)