I think you can get this to work for `File`s also by adding:

```scala
def asFile(v: Any): File = {
  v match {
    case s: String => new File(s)
    case f: File => f
  }
}
```

and changing this part to:

```scala
  Option(currentValue).map{asFile(_)} match {
    case Some(f) if !f.exists() =>
      ...
```