Separated log.py out of helper.py