Completely re-coded Exception handling and Logging.

This contains many fixes and enhancements. (Way to many to list)

Just and FYI it now logs info needed to help me troubleshoot