bug fix dir_exists