cleaned up logging message a bit.
refactored to remove exit calls.