fix dir location check