moving log.py to queue.py