Possible fix to log file stuff