Fixed directory check