updated code to properly handle log file
updated code to properly handle log file

LyonsLab/coge,asherkhb/coge,asherkhb/coge,asherkhb/coge,asherkhb/coge,LyonsLab/coge,LyonsLab/coge,LyonsLab/coge,LyonsLab/coge,asherkhb/coge,asherkhb/coge,asherkhb/coge,LyonsLab/coge,LyonsLab/coge,LyonsLab/coge,asherkhb/coge,asherkhb/coge,LyonsLab/coge