Fixed log file stuff