Throw IllegalArgumentException if there is no directory in property