added log output function...