refactored logger to allow multiple instances