modified logger.py