I added the directory check in 0b8005a