Modified to use log4net logging levels (Error and Debug.)