added log file IO