Use better the form `checkArgument(baseDir.isDirectory(), "%s is not a directory", baseDir)`.