Also, I think, at least for local files, we can check early, in spark submit whether that file exists or not.