Added some error checking
Added some error checking


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