refactored logmanager