setup directory correctly