added log.py
ast.py: improved logging