change some calls to log file