Why do we drop the useExisting field? 

Also you should do

{code}
checkpointDir = Option(directory).map { dir =>
  ...
}
{code}

to match the Spark style.