refactored logger to use input time and no more IO dependency