changed name of log to log_to_file