First off, that file isn't in the "root folder" - it's in the "current folder" which will be the one the app EXE file is running from.
That may be causing your problem, but since you don't provide any info on what the problem might be reporting as we can't tell.
And if the file
is in the root folder then that could be a problem all of it's own: depending on how the code attempts to open the file, that may fail as the root of some drives are write protected for security reasons.
See here:
Where should I store my data?[
^] for some better ideas.