checkDataPath function

Check data path