Fixed logs in the destructor not being commited to the log file.
Added proper logging to ConfigManager