fixed error in isdatalogging and cleaned it up.