Implementing ErrorManager class