normalizing path before checking