Bug Fix to report status and exit function

Bug Fix to report status and exit function