Fix exit callback error to log stringified object when error is non-Error object.