added log levels, fix analysis bug