Update Logger class for raising an exception instead of exiting program.
Add checking of resources.