changed log file handling