Some changes in path check