Fixed log file issues