Your sketch is buggy! You’re calling dataFile() before settings()!
The private
system field PApplet::sketchPath is initialized just before settings() is called back btW.
Processing.GitHub.io/processing-javadocs/core/processing/core/PApplet.html#sketchPath--