Refactored AgnError class as AgnLogger class