fix dir doesn't exist issue